Re: Delay or Sleep



On Monday 06 June 2005 14:10, Johan Kohler wrote:
> Hi,
> I want to implement a delay or a certain number of ms.  Under Windows, I
> would use Sleep().  Is there an equivalent GTKmm/glib Way(TM)?
>
> Thanks

Glib::usleep() will sleep the specified number of microseconds by yielding to 
other processes or threads (it is not a busy wait), except that in practice 
its minimum resolution is dependent on the kernel tick rate which in the 2.6 
Linux kernel is 1ms by default, and also on whatever other loading is on the 
system at the time.  In other words, it is not a hard realtime sleep but is a 
minimum wait time.

Chris

-- 
Summer is y-cumen in, lhude sing, cuccu!
Groweth sed and bloweth med, springeth the wude nu.



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