summaryrefslogtreecommitdiff
path: root/mac/src
diff options
context:
space:
mode:
authorAndrew Choi <akochoi@shaw.ca>2001-09-04 06:12:57 +0000
committerAndrew Choi <akochoi@shaw.ca>2001-09-04 06:12:57 +0000
commitbc04fb2cf2a5993e12ca561461fc7763028d1c32 (patch)
treeb468b8fe144130d187228c7c9df72492611e95d2 /mac/src
parent1305f1a7f48d3b3a0234bf4cdd0e24caa888d7d4 (diff)
downloademacs-bc04fb2cf2a5993e12ca561461fc7763028d1c32.tar.gz
2001-09-04 Andrew Choi <akochoi@cse.cuhk.edu.hk>
* src/mac.c (sleep) [__MRC__]: Place loop around WaitNextEvent to check time elapsed instead of use WaitNextEvent call as a delay.
Diffstat (limited to 'mac/src')
-rw-r--r--mac/src/mac.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mac/src/mac.c b/mac/src/mac.c
index 0aaad884f6d..d0c9d1a36c3 100644
--- a/mac/src/mac.c
+++ b/mac/src/mac.c
@@ -969,9 +969,15 @@ gettimeofday (tp)
unsigned int
sleep (unsigned int seconds)
{
+ unsigned long time_up;
EventRecord e;
- WaitNextEvent (0, &e, seconds * 60UL, NULL); /* Accept no event; just wait. by T.I.*/
+ time_up = TickCount () + seconds * 60;
+ while (TickCount () < time_up)
+ {
+ /* Accept no event; just wait. by T.I. */
+ WaitNextEvent (0, &e, 30, NULL);
+ }
return (0);
}