by scared2 on 6/20/20, 12:15 PM with 2 comments
by mytailorisrich on 6/20/20, 12:33 PM
These other aspect is that 64 bits allow such a huge interval that it makes sense to use it. Even counting in nanoseconds increments this allows for a monotonic counter to run over literally hundreds of years.
So 64 bits in increments of 1ns (or close to) is both doable on most modern hardware and allows for the vast majority of use cases for decades to come (if not longer) without have to think about changing it again and again.
by easytiger on 6/20/20, 5:37 PM
Windows is generally not considered viable for work at that level. Other Unix I've not used in that fashion sadly.
The python datetimes just wrap Linux calls to clock_gettime() to populate a timespec. On 32bit that is a syscall but on 64bit it is a VDSO, thus costs mostly just a memory access and avoids stack swap. (so very fast)
If you are using it to measure anything reliably you need a fairly solid ptp time infrastructure or it is pointless