| 49 | } |
| 50 | |
| 51 | double time(void) |
| 52 | { |
| 53 | #ifdef _WIN32 |
| 54 | |
| 55 | if(highRes) |
| 56 | { |
| 57 | LARGE_INTEGER Time; |
| 58 | QueryPerformanceCounter(&Time); |
| 59 | return (double)(Time.QuadPart) * tick; |
| 60 | } |
| 61 | else |
| 62 | return (double)GetTickCount() * tick; |
| 63 | |
| 64 | #else |
| 65 | |
| 66 | struct timeval tv; |
| 67 | gettimeofday(&tv, (struct timezone *)NULL); |
| 68 | return (double)(tv.tv_sec) + (double)(tv.tv_usec) * 0.000001; |
| 69 | |
| 70 | #endif |
| 71 | } |
| 72 | |
| 73 | double elapsed(void) |
| 74 | { |
no outgoing calls
no test coverage detected