Hello ...
Can somebody help telling me how smallest clock resolution on ones sytem can be in obtained in C using gettimeofday() .
Thankz in advance...
Hello ...
Can somebody help telling me how smallest clock resolution on ones sytem can be in obtained in C using gettimeofday() .
Thankz in advance...
The smallest resolution for gettimeofday would be microseconds according to the manpage.
1 microsecond is the granularity of the system call, not the resolution. To obtain the resolution you should use clock_getres() if you have it. Unix systems without clock_getres() tend to have a resolution of 10 milliseconds. There is no reliable way to obtain the resolution with gettimeofday().
gettimeofday will give you the current date and time specified in seconds or microseconds from the UNIX Epoch but not the resolution of the system-wide clock so be specific as to what you want?
/*