Working on the x86 bit port (caused some changes to try and get it
[tpg/acess2.git] / Kernel / time.c
index e8206ef..30d11dc 100644 (file)
@@ -17,7 +17,8 @@ typedef struct sTimer {
 } tTimer;
 
 // === PROTOTYPES ===
-void   Timer_CallTimers();
+Sint64 now(void);
+void   Timer_CallTimers(void);
 
 // === GLOBALS ===
 Uint64 giTicks = 0;
@@ -30,7 +31,7 @@ tTimer        gTimers[NUM_TIMERS];
  * \fn Sint64 now()
  * \brief Return the current timestamp
  */
-Sint64 now()
+Sint64 now(void)
 {
        return giTimestamp;
 }
@@ -42,6 +43,7 @@ void Timer_CallTimers()
 {
         int    i;
        void    (*callback)(void *);
+       void    *arg;
        
        for(i = 0;
                i < NUM_TIMERS;
@@ -49,16 +51,16 @@ void Timer_CallTimers()
        {
                if(gTimers[i].Callback == NULL) continue;
                if(giTimestamp < gTimers[i].FiresAfter) continue;
-               callback = gTimers[i].Callback;
+               callback = gTimers[i].Callback; arg = gTimers[i].Argument;
                gTimers[i].Callback = NULL;
-               callback(gTimers[i].Argument);
+               callback(arg);
        }
 }
 
 /**
- * \fn int Time_CreateTimer(int Delta, void *Callback, void *Argument)
+ * \fn int Time_CreateTimer(int Delta, tTimerCallback *Callback, void *Argument)
  */
-int Time_CreateTimer(int Delta, void *Callback, void *Argument)
+int Time_CreateTimer(int Delta, tTimerCallback *Callback, void *Argument)
 {
         int    ret;
        

UCC git Repository :: git.ucc.asn.au