[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Short sleeps.

On Friday 11 January 2002 12:59 am, you wrote:

I'm not sure about LInux, but I'm sure it has an equivilent to this:

perf_freq = QueryPerformanceFrequency();

start_time = QueryPerformanceTimer()/perf_freq;

while ((end_time - start_time) > delay) {
	end_time = QueryPerformanceTimer()/perf_freq;

Where the QueryPerformanceTimer() function is a high-resolution clock  I 
can't find details about the Linux equiv, but surely it exists?

Mark 'Nurgle' Collins
Lead Author - Linux Game Programming (Premiere Press)
Author - Advanced AI Game Development (WordWare)
Email: me@thisisnurgle.org.uk	Phone: +44 7761 774 152
Email: nurgle@isyourgod.net	Spam: spam@thisisnurgle.org.uk