summaryrefslogtreecommitdiff
path: root/timer.h
diff options
context:
space:
mode:
authorihm1998-03-05 17:31:32 +0000
committerihm1998-03-05 17:31:32 +0000
commitdc706ef662bda4a843aa088696132078472400d5 (patch)
tree0d877ea0200e0603f48c65fa2cf9cb6a4854edb0 /timer.h
parent23abb4b87c7e40ed259dd02f653516f60e55ade4 (diff)
downloadivy-c-dc706ef662bda4a843aa088696132078472400d5.zip
ivy-c-dc706ef662bda4a843aa088696132078472400d5.tar.gz
ivy-c-dc706ef662bda4a843aa088696132078472400d5.tar.bz2
ivy-c-dc706ef662bda4a843aa088696132078472400d5.tar.xz
Initial revision
Diffstat (limited to 'timer.h')
-rw-r--r--timer.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/timer.h b/timer.h
new file mode 100644
index 0000000..7aa425f
--- /dev/null
+++ b/timer.h
@@ -0,0 +1,18 @@
+/* Module de gestion des timers autour d'un select */
+
+typedef struct _timer *TimerId;
+typedef void (*TimerCb)( TimerId id , void *user_data, unsigned long delta );
+
+/* API le temp est en milli secondes */
+#define TIMER_LOOP -1 /* timer en boucle infinie */
+TimerId TimerRepeatAfter( int count, long time, TimerCb cb, void *user_data );
+
+void TimerModify( TimerId id, long time );
+
+void TimerRemove( TimerId id );
+
+/* Interface avec select */
+
+struct timeval *TimerGetSmallestTimeout();
+
+void TimerScan();