00001
00004 #ifndef SXTIMER_H_INCLUDED
00005 #define SXTIMER_H_INCLUDED
00006
00007 #include "sxObject.h"
00008
00031 class SX_SDKEXPORT sxTimer : public sxObject
00032 {
00033 public:
00034 virtual ~sxTimer();
00035 sxTimer();
00036 sxTimer(const sxTimer& ot);
00037 sxTimer(qint64 b);
00038 sxTimer& operator=(const sxTimer& ot);
00039
00040 void Start();
00041 qint64 uElapsed() const;
00042 int mElapsed() const;
00043
00044 qint64 Tic();
00045 qint64 uToc() const;
00046 double mToc() const;
00047 double Toc() const;
00048
00049 qint64 Base() const;
00050
00051 static qint64 now();
00052 static void uwait2(unsigned int usec, bool * cancel = 0);
00053 static void uwait(unsigned int usec);
00054 static void mwait(unsigned int msec);
00055 static void idle();
00056 private:
00057 qint64 xBase;
00058 };
00059
00060
00061 #endif // SXTIMER_H_INCLUDED