aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Choi2001-09-04 06:12:57 +0000
committerAndrew Choi2001-09-04 06:12:57 +0000
commitbc04fb2cf2a5993e12ca561461fc7763028d1c32 (patch)
treeb468b8fe144130d187228c7c9df72492611e95d2
parent1305f1a7f48d3b3a0234bf4cdd0e24caa888d7d4 (diff)
downloademacs-bc04fb2cf2a5993e12ca561461fc7763028d1c32.tar.gz
emacs-bc04fb2cf2a5993e12ca561461fc7763028d1c32.zip
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.
-rw-r--r--mac/ChangeLog4
-rw-r--r--mac/src/mac.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/mac/ChangeLog b/mac/ChangeLog
index fd259a54609..1ae1c7fdca8 100644
--- a/mac/ChangeLog
+++ b/mac/ChangeLog
@@ -9,7 +9,9 @@
9 * src/mac.c (stat): Don't fail for aliases. 9 * src/mac.c (stat): Don't fail for aliases.
10 (sys_open) [__MRC__]: Set file creator and type for newly-created 10 (sys_open) [__MRC__]: Set file creator and type for newly-created
11 files. 11 files.
12 12 (sleep) [__MRC__]: Place loop around WaitNextEvent to check time
13 elapsed instead of use WaitNextEvent call as a delay.
14
132001-08-24 Andrew Choi <akochoi@cse.cuhk.edu.hk> 152001-08-24 Andrew Choi <akochoi@cse.cuhk.edu.hk>
14 16
15 * src/macterm.c (init_font_name_table): Add an additional entry to 17 * src/macterm.c (init_font_name_table): Add an additional entry to
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)
969unsigned int 969unsigned int
970sleep (unsigned int seconds) 970sleep (unsigned int seconds)
971{ 971{
972 unsigned long time_up;
972 EventRecord e; 973 EventRecord e;
973 974
974 WaitNextEvent (0, &e, seconds * 60UL, NULL); /* Accept no event; just wait. by T.I.*/ 975 time_up = TickCount () + seconds * 60;
976 while (TickCount () < time_up)
977 {
978 /* Accept no event; just wait. by T.I. */
979 WaitNextEvent (0, &e, 30, NULL);
980 }
975 981
976 return (0); 982 return (0);
977} 983}