3 ms·
Note that some clock reads that appear to go through a file system actually don't on some architectures. On x86-64, there's a special page that's mapped read on
by MichaelSalib 13y ago
Note that some clock reads that appear to go through a file system actually don't on some architectures. On x86-64, there's a special page that's mapped read only for all processes. This page includes time data that is updated by the kernel. When you call the glibc syscall wrapper to get the time, it doesn't actually invoke a syscall; instead, it just reads the correct bit of data from that page. I don't know if that applies to nanosecond resolution clocks though....
- enriquepablo 13y agoThat would be the _COARSE clocks the article mentions... It would obviously not have nanosecond resolution - for that it would have to be updated by the kernel every nanosecond.