[fpc-devel] High performance Linux timer

Vladimir Zhirov vvzh.home at gmail.com
Mon May 19 12:42:00 CEST 2008


Hi,

Graeme Geldenhuys wrote:
> Does anybody know if there is a Linux (or generic Unix) high
> performance timer API available. Something like the Win32 API
> QueryPerformanceCounter()?

Graeme, maybe this link will help:
http://www.gamedev.net/community/forums/topic.asp?topic_id=127700

There are some functions mentioned there in addition to RDTSC:
- gettimeofday
- clock_gettime
- ftime

> Anybody know what Win32's QueryPerformanceCounter() uses internally to
> get a stable timer?  Or is QueryPerformanceCounter also susceptible to
> powersaving features?

I found an article named "Beware of QueryPerformanceCounter()" on
http://www.virtualdub.org/blog/pivot/entry.php?id=106
that gives some information about this function.
It will not answer your questions directly, but may be useful.

-- 
Regards,
  Vladimir




More information about the fpc-devel mailing list