PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
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
16typedef acUint64 acTime;
17typedef struct ac_timer acTimerData;
18typedef acTimerData *acTimerT;
19typedef void (*acTimerDone)(acTimerT timer, void *t_arg);
20
22{
23 acQueueChainData t_chain;
24 acTime t_deadline;
25 acTimerDone t_done;
26 void *t_arg;
27};
28
29extern int acTimerModuleStart(int argc, char **argv);
30extern int acTimerModuleRestart(int argc, char **argv);
31extern int acTimerModuleStop();
32extern int acTimerModuleStatus();
33extern int acTimerAdd(acTimerT timer, acTimerDone done, void *arg, unsigned int us);
34extern 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