1 |
|
/* |
2 |
|
* timer.cpp - Time Manager emulation |
3 |
|
* |
4 |
< |
* SheepShaver (C) 1997-2005 Christian Bauer and Marc Hellwig |
4 |
> |
* SheepShaver (C) 1997-2008 Christian Bauer and Marc Hellwig |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
428 |
|
// Yes, tmWakeUp set? |
429 |
|
if (ReadMacInt32(tm + tmWakeUp)) { |
430 |
|
|
431 |
+ |
// PrimeTime(0) can either mean (a) "the task runs as soon as interrupts are enabled" |
432 |
+ |
// or (b) "continue previous delay" if an expired task was stopped via RmvTime() and |
433 |
+ |
// then re-installed using InsXTime(). This currently only handles (a). |
434 |
+ |
// |
435 |
+ |
// API reference: http://developer.apple.com/documentation/mac/Processes/Processes-68.html |
436 |
+ |
|
437 |
+ |
#if 0 |
438 |
|
//!! PrimeTime(0) means continue previous delay |
439 |
|
// (save wakeup time in RmvTime?) |
440 |
|
if (time == 0) { |
441 |
|
printf("FATAL: Unsupported PrimeTime(0)\n"); |
442 |
|
return 0; |
443 |
|
} |
444 |
+ |
#endif |
445 |
|
|
446 |
|
// Yes, calculate wakeup time relative to last scheduled time |
447 |
|
tm_time_t wakeup; |