Go to the source code of this file.
◆ do_cycles()
| double do_cycles |
( |
int |
minimum_time | ) |
|
Definition at line 8 of file busy_work.c.
9{
12
13 gettimeofday( &
start, NULL );
14
15 for ( ;; ) {
16 sum = 1.0;
17 for (
x = 1.0;
x < 250000.0;
x += 1.0 ) {
19 }
20 if ( sum < 0.0 ) {
21 printf( "==>> SUM IS NEGATIVE !! <<==\n" );
22 }
23
24 gettimeofday( &now, NULL );
26 break;
27 }
28 }
29 return sum;
30}
static struct timeval start