Skip to content

getMonotonicTime should return the number of seconds rather than nanoseconds on osx#127

Merged
jkeuhlen merged 1 commit intofpco:masterfrom
jkeuhlen:getMonoTonicTimeUnits
Sep 4, 2025
Merged

getMonotonicTime should return the number of seconds rather than nanoseconds on osx#127
jkeuhlen merged 1 commit intofpco:masterfrom
jkeuhlen:getMonoTonicTimeUnits

Conversation

@jkeuhlen
Copy link
Collaborator

I originally described the problem I was seeing via stack build --debug over here: commercialhaskell/rio-prettyprint#26

The tldr; is stack's debug output was off by a factor of 10^9 in reporting how long things took to run.

Sorting through the commit history I found #91 which solved a build issue, but I think introduced this regression.

via https://www.manpagez.com/man/3/clock_gettime_nsec_np/, clock_gettime_nsec_np returns the number of nanoseconds:
image

#91 references this similar work done in the criterion PR which did have the / 1e9: haskell/criterion@607b18c#diff-2a2fbceda772ad663c4dab2a9d6d8350662f5c4d3012819e8ec5d45574330318R8

@jkeuhlen jkeuhlen merged commit 7463fa9 into fpco:master Sep 4, 2025
9 of 18 checks passed
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.

2 participants