2 * stops timer, writes string s and the time since last call of startTimer * if this time is > mintime */
| 171 | * if this time is > mintime |
| 172 | */ |
| 173 | void writeRTime(const char* v) |
| 174 | { |
| 175 | struct timeval now; |
| 176 | |
| 177 | gettimeofday(&now, &tzp); |
| 178 | |
| 179 | if (siStartRTime.tv_usec > now.tv_usec) |
| 180 | { |
| 181 | now.tv_usec += 1000000; |
| 182 | now.tv_sec --; |
| 183 | } |
| 184 | |
| 185 | double f =((double) (now.tv_sec - siStartRTime.tv_sec)) + |
| 186 | ((double) (now.tv_usec - siStartRTime.tv_usec)) / |
| 187 | (double) 1000000; |
| 188 | |
| 189 | if (f > mintime) |
| 190 | Print("//%s %.2f sec \n" ,v ,f); |
| 191 | } |
no test coverage detected