PS2SDK
PS2 Homebrew Libraries
actimer.h
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
11 #ifndef _ACTIMER_H
12 #define _ACTIMER_H
13 
14 #include <accore.h>
15 
16 typedef acUint64 acTime;
17 typedef struct ac_timer acTimerData;
18 typedef acTimerData *acTimerT;
19 typedef void (*acTimerDone)(acTimerT timer, void *t_arg);
20 
21 struct ac_timer
22 {
23  acQueueChainData t_chain;
24  acTime t_deadline;
25  acTimerDone t_done;
26  void *t_arg;
27 };
28 
29 extern int acTimerModuleStart(int argc, char **argv);
30 extern int acTimerModuleRestart(int argc, char **argv);
31 extern int acTimerModuleStop();
32 extern int acTimerModuleStatus();
33 extern int acTimerAdd(acTimerT timer, acTimerDone done, void *arg, unsigned int us);
34 extern int acTimerRemove(acTimerT timer);
35 
36 #define actimer_IMPORTS_start DECLARE_IMPORT_TABLE(actimer, 1, 1)
37 #define actimer_IMPORTS_end END_IMPORT_TABLE
38 
39 #define I_acTimerModuleStart DECLARE_IMPORT(4, acTimerModuleStart)
40 #define I_acTimerModuleRestart DECLARE_IMPORT(5, acTimerModuleRestart)
41 #define I_acTimerModuleStop DECLARE_IMPORT(6, acTimerModuleStop)
42 #define I_acTimerModuleStatus DECLARE_IMPORT(7, acTimerModuleStatus)
43 #define I_acTimerAdd DECLARE_IMPORT(8, acTimerAdd)
44 #define I_acTimerRemove DECLARE_IMPORT(9, acTimerRemove)
45 
46 #endif
ac_queue
Definition: accore.h:52
ac_timer
Definition: actimer.h:21