35#include "../windows/Time.h"
47 std::chrono::time_point<std::chrono::high_resolution_clock> start_t;
75 start_t = std::chrono::high_resolution_clock::now();
77 tz.tz_minuteswest = 0;
78 if( gettimeofday( &tv, NULL ) == 0 ){
82 else start_t = start_u = 0;
90 auto d = std::chrono::duration_cast<std::chrono::microseconds>( std::chrono::high_resolution_clock::now() - start_t );
93 if( gettimeofday( &tv, NULL ) == 0 )
return (tv.tv_sec - start_t) * 1000000 + (tv.tv_usec - start_u);
Simple Timer class to allow us to time our responses.
Definition: Timer.h:40
void start()
Set our time.
Definition: Timer.h:73
Timer()
Constructor.
Definition: Timer.h:68
long getTime()
Return time since we were initialised in microseconds.
Definition: Timer.h:88