You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To recap: system clock is constantly floating and it doesn't move only forwards. If your calculation of elapsed time is based on it, you're very likely to run into calculation errors or even outages.
Remember: wall clock is for telling time, monotonic clock is for measuring time. ⏰
This is why you probably don't want to use Time but Process.clock_gettime(Process::CLOCK_MONOTONIC) to calculate the elapsed time.
Cheers!
The text was updated successfully, but these errors were encountered:
Hi,
Thank you for open sourcing this!
I recently came across a post that I think might be useful for this gem: Elapsed time with Ruby, the right way. The author writes:
This is why you probably don't want to use
Time
butProcess.clock_gettime(Process::CLOCK_MONOTONIC)
to calculate the elapsed time.Cheers!
The text was updated successfully, but these errors were encountered: