Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update time format to return fractional seconds #155

Merged
merged 3 commits into from Mar 26, 2019

Conversation

stevendaniels
Copy link
Contributor

Previously, the time would return seconds as integer values. This update returns milliseconds, too.

time = 3.141
sprintf('%0.000f', time)
# => "3"

sprintf('%.3f', time)
# => "3.141"

Before

Screen Shot 2019-03-25 at 10 04 57

After

Screen Shot 2019-03-25 at 09 58 23

Previously, the time would return seconds as integer values. This update returns milliseconds, too.

```ruby
time = 3.141
sprintf('%0.000f', time)
# => "3"

sprintf('%.3f', time)
# => "3.141"
```
pbyrne
pbyrne previously approved these changes Mar 25, 2019
@@ -64,7 +64,7 @@ module OkComputer

context "#to_text" do
it "combines the registrant_name, success, message, and execution time" do
expect(subject.to_text).to eq("#{subject.registrant_name}: PASSED #{subject.message} (5s)")
expect(subject.to_text).to eq("#{subject.registrant_name}: PASSED #{subject.message} (5.000s)")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2019-03-25 at 17 25 46

@pbyrne pbyrne merged commit 550405e into sportngin:master Mar 26, 2019
@pbyrne
Copy link
Collaborator

pbyrne commented Mar 26, 2019

v1.7.4 is released with these changes. Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants