diff --git a/rtengine/StopWatch.h b/rtengine/StopWatch.h index e43b90247..468f0817c 100644 --- a/rtengine/StopWatch.h +++ b/rtengine/StopWatch.h @@ -22,7 +22,7 @@ #ifndef STOPWATCH_H #define STOPWATCH_H #include -#include +#include "mytime.h" class StopWatch { public: @@ -31,14 +31,13 @@ public: ~StopWatch() { if(!stopped) stop(); } void start() { - gettimeofday(&startStruct,NULL); + startTime.set(); }; void stop() { - gettimeofday(&stopStruct,NULL); - long elapsedTime = (stopStruct.tv_sec - startStruct.tv_sec) * 1000.0; // sec to ms - elapsedTime += (stopStruct.tv_usec - startStruct.tv_usec)/1000; - std::cout << message << " took " << elapsedTime << "ms" <