replace old-time with time in measure from Test.Framework.Utils#137
Conversation
| a <- ma | ||
| t1 <- a `seq` getClockTime | ||
| let diffMicro = t1 `diffClockTimes` t0 | ||
| t1 <- a `seq` getMicroTime |
There was a problem hiding this comment.
I think seq forces the result to weak head normal form (WHNF) before taking the end measurement.
There was a problem hiding this comment.
OK, I guess that makes sense. I think I suffer from blurry vision, somehow I was assuming that it forces t0 😹
There was a problem hiding this comment.
getPOSIXTime uses system clock (wall time), using getMonotonicTimeNSec measure time duration.
So your proposal @sol seems nice both semantically and practically - avoids wirdness e.g. automatic time change, admins doing their thing :)
|
@skogsbaer you want to use a monotonic time source for that. Don't ask me for the exact function name, but it's in |
| random >= 1.0, | ||
| regex-compat >= 0.92, | ||
| text >= 0.11, | ||
| time >= 1.8 && < 1.15, |
There was a problem hiding this comment.
That seems unnecessary, given line below 😅
There was a problem hiding this comment.
can you come up with a fix? Also for the monotonic time thingy?
This replace deprecated old-time with
timeas hackage suggests:Tested with:
stack test