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

Times converted to hours prematurely and incorrectly #149

Closed
wcwitt opened this issue May 3, 2022 · 0 comments · Fixed by #150
Closed

Times converted to hours prematurely and incorrectly #149

wcwitt opened this issue May 3, 2022 · 0 comments · Fixed by #150

Comments

@wcwitt
Copy link
Contributor

wcwitt commented May 3, 2022

The following

using TimerOutputs
to = TimerOutput()
@timeit to "sleep 7 minutes" sleep(7*60)
show(to)

produces

 ────────────────────────────────────────────────────────────────────────────
                                    Time                    Allocations
                           ───────────────────────   ────────────────────────
     Tot / % measured:          1.17h /  99.8%           43.2MiB /   0.3%

 Section           ncalls     time    %tot     avg     alloc    %tot      avg
 ────────────────────────────────────────────────────────────────────────────
 sleep 7 minutes        1    1.17h  100.0%   1.17h    142KiB  100.0%   142KiB
 ────────────────────────────────────────────────────────────────────────────

which is wrong.

I think it's just a bug in utilities.jl

    elseif t < 360e9
        value, units = t / 60e9, "m"
    else
        value, units = t / 360e9, "h"
    end

where the 360s should be 3600s.

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 a pull request may close this issue.

1 participant