root/library/tests/unittest-cpp/Posix/TimeHelpers.h
@
896
| Revision 706, 291 bytes (checked in by smidl, 16 years ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | #ifndef UNITTEST_TIMEHELPERS_H |
| 2 | #define UNITTEST_TIMEHELPERS_H |
| 3 | |
| 4 | #include <sys/time.h> |
| 5 | |
| 6 | namespace UnitTest { |
| 7 | |
| 8 | class Timer { |
| 9 | public: |
| 10 | Timer(); |
| 11 | void Start(); |
| 12 | double GetTimeInMs() const; |
| 13 | |
| 14 | private: |
| 15 | struct timeval m_startTime; |
| 16 | }; |
| 17 | |
| 18 | |
| 19 | namespace TimeHelpers { |
| 20 | void SleepMs ( int ms ); |
| 21 | } |
| 22 | |
| 23 | |
| 24 | } |
| 25 | |
| 26 | #endif |
Note: See TracBrowser
for help on using the browser.
