-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patha_evnt_timer.c
37 lines (31 loc) · 924 Bytes
/
a_evnt_timer.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "gem_aesP.h"
/** releases control to the operating system until
* a specified amount of time has passed.
*
* @param interval time value specified in milliseconds.
* @param global_aes global AES array
*
* @return reserved and is currently always 1.
*
* @since All AES versions. Under TOS 1.0, calling this
* function from a desk accessory with \a interval
* having a value of 0 will hang the system.
*
* @sa mt_evnt_multi()
*
* This function should not be relyed on as an accurate clock.
* The time specified is used as a minimum time value only and
* the function will return at some point after that duration
* has passed.
*
*/
short
mt_evnt_timer (unsigned long interval, short *global_aes)
{
unsigned short *i = (unsigned short *)&interval;
AES_PARAMS(24,2,1,0,0);
aes_intin[0] = i[1];
aes_intin[1] = i[0];
AES_TRAP(aes_params);
return (aes_intout[0]);
}