double interval, double delay,
bool repeat, bool simtime)
{
+ // Clamp the delay value to 1 usec, so that user code can use
+ // "zero" as a synonym for "next frame".
+ if(delay <= 0) delay = 0.000001;
+
SGTimer* t = new SGTimer;
t->interval = interval;
t->callback = cb;
SGTimerQueue::~SGTimerQueue()
{
+ for(int i=0; i<_numEntries; i++) {
+ delete _table[i].timer;
+ _table[i].timer = 0;
+ }
+ _numEntries = 0;
delete[] _table;
+ _table = 0;
+ _tableSize = 0;
}
void SGTimerQueue::update(double deltaSecs)