| 151 | } |
| 152 | |
| 153 | void |
| 154 | StatisticalTimer::Stop( sTimerID id ) |
| 155 | { |
| 156 | unsigned long long n; |
| 157 | |
| 158 | #if defined( _WIN32 ) |
| 159 | ::QueryPerformanceCounter( reinterpret_cast<LARGE_INTEGER*>( &n ) ); |
| 160 | #else |
| 161 | struct timeval s; |
| 162 | gettimeofday(&s, 0); |
| 163 | n = (unsigned long long)s.tv_sec * 1000000 + (unsigned long long)s.tv_usec; |
| 164 | #endif |
| 165 | |
| 166 | n -= clkStart.at( id ); |
| 167 | clkStart.at( id ) = 0; |
| 168 | AddSample( id, n ); |
| 169 | } |
| 170 | |
| 171 | void |
| 172 | StatisticalTimer::AddSample( const sTimerID id, const unsigned long long n ) |
no outgoing calls
no test coverage detected