40#include <BaServerLib.h> 
   42#include <DoubleList.h> 
   46#define BA_TIMER_SLOTS 32 
   50typedef BaBool (*BaTimer_CB)(
void* data);
 
   83      size_t set(BaTimer_CB cb, 
void* data, U32 milliSec);
 
   90      int reset(
size_t tkey, U32 milliSec);
 
  104   DoubleList slots[BA_TIMER_SLOTS];
 
  117BA_API 
void BaTimer_constructor(
 
  120BA_API 
void BaTimer_destructor(
BaTimer* o);
 
  121BA_API 
size_t BaTimer_set(
BaTimer* o, BaTimer_CB cb, 
void* data, U32 milliSec);
 
  122BA_API 
int BaTimer_reset(
BaTimer* o, 
size_t tkey, U32 milliSec);
 
  123BA_API 
int BaTimer_cancel(
BaTimer* o, 
size_t tkey);
 
  128   BaTimer_constructor(
this, mutex, stackSize, ticklen, priority,alloc);
 
  131   BaTimer_destructor(
this);
 
  134   return BaTimer_set(
this, cb, data, milliSec);
 
  137   return BaTimer_reset(
this, tkey, milliSec);
 
  140   return BaTimer_cancel(
this, tkey);
 
ThreadPriority
Thread priority list.
Definition: ThreadLib.h:58
Memory allocation and deallocation Interface class.
Definition: AllocatorIntf.h:83
The timer class makes it possible to create events that are activated at regular intervals or to crea...
Definition: BaTimer.h:59
BaTimer(ThreadMutex *mutex, int stackSize, U32 ticklen=10, ThreadPriority priority=ThreadPrioNormal, AllocatorIntf *alloc=0)
Create a BaTimer object and one thread.
Definition: BaTimer.h:126
~BaTimer()
Terminate the timer.
Definition: BaTimer.h:130
size_t set(BaTimer_CB cb, void *data, U32 milliSec)
Create a timer event.
Definition: BaTimer.h:133
int reset(size_t tkey, U32 milliSec)
Resets the timer.
Definition: BaTimer.h:136
int cancel(size_t tkey)
Cancels the timer.
Definition: BaTimer.h:139
A mutual exclusion class.
Definition: ThreadLib.h:186
A simple thread class.
Definition: ThreadLib.h:241