[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSRunLoop and timers
From: |
Nicolas Roard |
Subject: |
Re: NSRunLoop and timers |
Date: |
Fri, 08 Aug 2003 21:07:47 +0100 |
On 2003-08-08 16:44:32 +0000 Cyrille Gautard <cyrille.gautard@wanadoo.fr> wrote:
Hello,
I use a NSRunLoop to perform screen updates in an openGL program. I use
the performSelector method to call my display method on each loop. But
the NSRunLoop doesn't loop until an event is sent. So I use an NSTimer
to send an event but it limits the frame per second to the timer
interval.
How can I use the NSRunLoop class without being limited by the timer and
display the most possible frames per second ?
the seconds you specify in NSTimer are a typedef double NSTimeInterval;
so, just set the timer to the number of millisecond you want. The delay is
expressed in seconds, but nobody prevents you to set a delay of 0.001 seconds ..
--
Nicolas Roard <nicolas@roard.com> PGP :
http://www.roard.com/download/key.gpg.asc
http://www.petitiononline.com/laafs/petition.html
Work for something because it is good, not just because it stands a chance to
succeed. - Vaclav Havel