How much do #Python clocks progress in "60 seconds"?

CLOCK_BOOTTIME 60.6
CLOCK_MONOTONIC 60.6
CLOCK_MONOTONIC_RAW 56.0
CLOCK_PROCESS_CPUTIME_ID 0.000952
CLOCK_REALTIME 60.6
CLOCK_TAI 60.6
CLOCK_THREAD_CPUTIME_ID 0.000952

Only CLOCK_MONOTONIC_RAW is tracking the hardware #clock correctly.

So if you actually want to measure #time accurately, use that one.

#linux #monotonic #ntp #rtc

@dcz Does that mean your python programs are running 56/60 time vs rust or C? Sounds too fast. ;-)

@lwriemen The only way to find out is to pit them to a race. Brb.

@lwriemen My Rust programs sleep just as fast as my Python programs :)
I will spare the world more C code.

Follow

@dcz Just a joke. For serious results I like to look at the https://benchmarksgame-team.pages.debian/benchmarkgame/index.html
Right now, there's no direct head-to-head rust to python, but from each comparisons to similar languages show rust is about 100x faster than python for most algorithms.

I just like to belittle python; much like I used to do with Visual Basic in days past.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml