dorotaC on Nostr: How much do #Python clocks progress in "60 seconds"? CLOCK_BOOTTIME 60.6 ...
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
Published at
2025-02-08 07:26:54Event JSON
{
"id": "381ad726276bdf6b7e69f7bdbc1fa97c37ad59577aa4bdf731117bdf4647c9f3",
"pubkey": "6b21c06c57aca12c8db0107e061b68c1be74bb969cfcd6fb5b2f8fc02bb82ace",
"created_at": 1738999614,
"kind": 1,
"tags": [
[
"t",
"python"
],
[
"t",
"clock"
],
[
"t",
"time"
],
[
"t",
"linux"
],
[
"t",
"monotonic"
],
[
"t",
"ntp"
],
[
"t",
"rtc"
],
[
"proxy",
"https://fosstodon.org/users/dcz/statuses/113967078756846163",
"activitypub"
]
],
"content": "How much do #Python clocks progress in \"60 seconds\"?\n\nCLOCK_BOOTTIME 60.6\nCLOCK_MONOTONIC 60.6\nCLOCK_MONOTONIC_RAW 56.0\nCLOCK_PROCESS_CPUTIME_ID 0.000952\nCLOCK_REALTIME 60.6\nCLOCK_TAI 60.6\nCLOCK_THREAD_CPUTIME_ID 0.000952\n\nOnly CLOCK_MONOTONIC_RAW is tracking the hardware #clock correctly.\n\nSo if you actually want to measure #time accurately, use that one.\n\n#linux #monotonic #ntp #rtc",
"sig": "858833a94b5ddbfa5854cffb66a64b08684ffa09ca213a82665ec6c0edc1ccca957075a227396860cfa6bb1d3a3b26932c5d297303fab7879d1257ff1e8adec8"
}