diff options
author | stuge <stuge@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2008-09-07 03:14:27 +0000 |
---|---|---|
committer | stuge <stuge@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2008-09-07 03:14:27 +0000 |
commit | 90ace40706cfb53838fcd559464dc4b828baadbe (patch) | |
tree | f857c102a8c2a296337dbb3553ae75cb9228d0ee | |
parent | 17af4a23ccd8dadc6bb557aaf90404dcad7b9016 (diff) | |
download | flashrom-90ace40706cfb53838fcd559464dc4b828baadbe.tar.gz |
Original v2 revision: 3569
flashrom: Debug print actual time base calculated by myusec_calibrate_delay()
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@314 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r-- | udelay.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -55,6 +55,12 @@ void myusec_calibrate_delay() // compute one microsecond. That will be count / time micro = count / timeusec; - printf_debug("%ldM loops per second. ", (unsigned long)micro); + gettimeofday(&start, 0); + myusec_delay(100); + gettimeofday(&end, 0); + timeusec = 1000000 * (end.tv_sec - start.tv_sec) + + (end.tv_usec - start.tv_usec); + printf_debug("%ldM loops per second, 100 myus = %ld us. ", + (unsigned long)micro, timeusec); printf("OK.\n"); } |