high resolution time function?

high resolution time function?

Post by sysa » Sat, 17 Jul 2004 18:38:01


hello
i need a high resolution c/c++ time function.
i use times and CLK_TCK but it has low resolution.
i need something like QueryPerformanceCounter on windows.
thanks for help.
kuba
 
 
 

high resolution time function?

Post by robertharv » Mon, 19 Jul 2004 18:20:12


Have a look in `sys/time.h' - look for struct timeval - it consists of
two variables, normal system time seconds, and microsecons.

It is one of the values returned by gettimeofday