diff options
author | 2015-09-02 13:49:59 +0200 | |
---|---|---|
committer | 2015-09-02 13:50:20 +0200 | |
commit | 70bddf12f5f92a71022c049fb6b8f4f8672af974 (patch) | |
tree | da554cf16908c6092dcbc4c01598a318520b5384 /3rdparty/unittest-cpp/UnitTest++/Posix/TimeHelpers.cpp | |
parent | a7943aa92f2c78c65c5313980c55357a31697b29 (diff) |
Added GoogleTest and convert tests to us it (nw)
Diffstat (limited to '3rdparty/unittest-cpp/UnitTest++/Posix/TimeHelpers.cpp')
-rw-r--r-- | 3rdparty/unittest-cpp/UnitTest++/Posix/TimeHelpers.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/3rdparty/unittest-cpp/UnitTest++/Posix/TimeHelpers.cpp b/3rdparty/unittest-cpp/UnitTest++/Posix/TimeHelpers.cpp deleted file mode 100644 index 65c63937a0e..00000000000 --- a/3rdparty/unittest-cpp/UnitTest++/Posix/TimeHelpers.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "TimeHelpers.h" -#include <unistd.h> - -namespace UnitTest { - -Timer::Timer() -{ - m_startTime.tv_sec = 0; - m_startTime.tv_usec = 0; -} - -void Timer::Start() -{ - gettimeofday(&m_startTime, 0); -} - -double Timer::GetTimeInMs() const -{ - struct timeval currentTime; - gettimeofday(¤tTime, 0); - - double const dsecs = currentTime.tv_sec - m_startTime.tv_sec; - double const dus = currentTime.tv_usec - m_startTime.tv_usec; - - return (dsecs * 1000.0) + (dus / 1000.0); -} - -void TimeHelpers::SleepMs(int ms) -{ - usleep(ms * 1000); -} - -} |