int parent(int n) { return ((n+1)/2) - 1; }
int lchild(int n) { return ((n+1)*2) - 1; }
int rchild(int n) { return ((n+1)*2 + 1) - 1; }
+ double pri(int n) { return _table[n].pri; }
void swap(int a, int b) {
HeapEntry tmp = _table[a];
_table[a] = _table[b];
void siftDown(int n);
void siftUp(int n);
void growArray();
- void check();
+
+ // gcc complains there is no function specification anywhere.
+ // void check();
double _now;
HeapEntry *_table;
class SGEventMgr : public SGSubsystem
{
public:
- SGEventMgr() { _freezeProp = 0; }
+ SGEventMgr() { _rtProp = 0; }
+ ~SGEventMgr() { _rtProp = 0; }
virtual void init() {}
virtual void update(double delta_time_sec);
- void setFreezeProperty(SGPropertyNode* node) { _freezeProp = node; }
+ void setRealtimeProperty(SGPropertyNode* node) { _rtProp = node; }
/**
* Add a single function callback event as a repeating task.
bool repeat, bool simtime);
SGPropertyNode* _freezeProp;
+ SGPropertyNode* _rtProp;
SGTimerQueue _rtQueue;
SGTimerQueue _simQueue;
};