On 4 Sep 2008, at 4:14 pm, D.K. Johnston wrote:
The reason I want a delay is that the user is supposed to have 10
seconds only to look at the data displayed in the matrix. Then it's
cleared. (It's a memory test, to prevent drunks from starting a
computer.)
I was looking at NSTimer, but i
Thanks for your reply. The "index" variable is actually "i": I forgot
to change it when pasting the code into the email. So it does
terminate after 10 seconds.
The reason I want a delay is that the user is supposed to have 10
seconds only to look at the data displayed in the matrix. Then it
On 4 Sep 2008, at 2:40 pm, D.K. Johnston wrote:
// wait 10 seconds
NSUInteger i = 0, resume = time( nil ) + 10;
while( i < resume )
index = time( nil );
Don't do this!
This is not a good way to wait for a period of time, even if waiting
for a perio