Can i trust the result of clock_getres?
-
Hi, i am confused about the return value of the clock_getres functions. I am running on custom hw with armv4 cpu and kernel version 2.6.26. I get values 7812500 (nanoseconds) for CLOCK_REALTIME and CLOCK_MONOTONIC. Can i trust that the resolution of gettimeofday (uses CLOCK_REALTIME?) calls is ~7.8ms? Does the CPU clock speed affect this value? Regards ele lont
-
Hi, i am confused about the return value of the clock_getres functions. I am running on custom hw with armv4 cpu and kernel version 2.6.26. I get values 7812500 (nanoseconds) for CLOCK_REALTIME and CLOCK_MONOTONIC. Can i trust that the resolution of gettimeofday (uses CLOCK_REALTIME?) calls is ~7.8ms? Does the CPU clock speed affect this value? Regards ele lont
Most time functions have a resolution that is about on this order of magnitude. I've read somewhere that on most current systems the resolution is about 10-20ms, but 7.8ms sounds entirely reasonable too. And no, CPU speed doesn't matter. Note that there are also functions for high-res time measurement. There is plenty of info about it on the web
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
-
Hi, i am confused about the return value of the clock_getres functions. I am running on custom hw with armv4 cpu and kernel version 2.6.26. I get values 7812500 (nanoseconds) for CLOCK_REALTIME and CLOCK_MONOTONIC. Can i trust that the resolution of gettimeofday (uses CLOCK_REALTIME?) calls is ~7.8ms? Does the CPU clock speed affect this value? Regards ele lont
You should. However you could also make a test.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite