/extlibs/UnitTest++/source/Posix/TimeHelpers.h

https://bitbucket.org/hugoruscitti/pilascpp · C++ Header · 28 lines · 19 code · 9 blank · 0 comment · 0 complexity · 193ebb1b29949c31f3980c360d77c242 MD5 · raw file

  1. #ifndef UNITTEST_TIMEHELPERS_H
  2. #define UNITTEST_TIMEHELPERS_H
  3. #include <sys/time.h>
  4. namespace UnitTest {
  5. class Timer
  6. {
  7. public:
  8. Timer();
  9. void Start();
  10. int GetTimeInMs() const;
  11. private:
  12. struct timeval m_startTime;
  13. };
  14. namespace TimeHelpers
  15. {
  16. void SleepMs (int ms);
  17. }
  18. }
  19. #endif