I'm using C, under Linux, on a PC. I'd like to get access to a timer with
millisecond resolution.
So far, I've been using clock_t and time() from time.h, but these only give
centisecond resolution.
Are there any timers that will give less than this?
If so, any pointers to the relevant functions/include files would be great.
Many thanks,
Ed
A good starting place might be chapter 5 of the OReilly
"Understanding the Linux Kernel" by Bovet and Cesati.
It goes into detail about timing measurements.
John Hearns
try 'man gethrtime'
best regards
alin
> Hi,
>
> I'm using C, under Linux, on a PC. I'd like to get access to a timer with
> millisecond resolution.
>
> So far, I've been using clock_t and time() from time.h, but these only give
> centisecond resolution.
>
> Are there any timers that will give less than this?
as the time man page states, have a look into gettimeofday
karl.