Skip to content

Commit

Permalink
Time resolution on GNU/Hurd is 10 msec not 1 usec as for other systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
gnu-srs authored and SoapGentoo committed Jan 23, 2021
1 parent fadf586 commit 2b5eda9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/throughput_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ throughput_test (int converter, long best_throughput)
total_frames += src_data.output_frames_gen ;

clock_time = clock () - start_time ;
#ifdef __GNU__ /* Clock resolution is 10ms on GNU/Hurd */
duration = (10000.0 * clock_time) / CLOCKS_PER_SEC ;
#else
duration = (1.0 * clock_time) / CLOCKS_PER_SEC ;
#endif
}
while (duration < 3.0) ;

Expand Down

0 comments on commit 2b5eda9

Please sign in to comment.