Changeset 3569 for trunk

Show
Ignore:
Timestamp:
09/07/08 05:14:27 (3 months ago)
Author:
stuge
Message:

flashrom: Debug print actual time base calculated by myusec_calibrate_delay()

Signed-off-by: Peter Stuge <peter@…>
Acked-by: Peter Stuge <peter@…>

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/util/flashrom/udelay.c

    r2873 r3569  
    5656        micro = count / timeusec; 
    5757 
    58         printf_debug("%ldM loops per second. ", (unsigned long)micro); 
     58        gettimeofday(&start, 0); 
     59        myusec_delay(100); 
     60        gettimeofday(&end, 0); 
     61        timeusec = 1000000 * (end.tv_sec - start.tv_sec) + 
     62            (end.tv_usec - start.tv_usec); 
     63        printf_debug("%ldM loops per second, 100 myus = %ld us. ", 
     64            (unsigned long)micro, timeusec); 
    5965        printf("OK.\n"); 
    6066}