diff options
author | Michael Brown | 2008-10-12 20:56:52 +0200 |
---|---|---|
committer | Michael Brown | 2008-10-12 21:22:02 +0200 |
commit | 16f1e35775c972ba8e02bc2d97d7a2eb333eae1b (patch) | |
tree | f653099d4b230c9807986aa2b4cd89dce2cffe9b /src/core/monojob.c | |
parent | [process] Add DBG2() messages to help track down frozen processes (diff) | |
download | ipxe-16f1e35775c972ba8e02bc2d97d7a2eb333eae1b.tar.gz ipxe-16f1e35775c972ba8e02bc2d97d7a2eb333eae1b.tar.xz ipxe-16f1e35775c972ba8e02bc2d97d7a2eb333eae1b.zip |
[timer] Formalise the timer API
We now have two implementations for the timer API: one using the
time-of-day counter at 40:70 and one using RDTSC. Both make use of
timer2_udelay().
Diffstat (limited to 'src/core/monojob.c')
-rw-r--r-- | src/core/monojob.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/monojob.c b/src/core/monojob.c index 2c91e132..a7e83851 100644 --- a/src/core/monojob.c +++ b/src/core/monojob.c @@ -63,7 +63,8 @@ struct job_interface monojob = { int monojob_wait ( const char *string ) { int key; int rc; - tick_t last_progress_dot; + unsigned long last_progress_dot; + unsigned long elapsed; printf ( "%s.", string ); monojob_rc = -EINPROGRESS; @@ -81,7 +82,8 @@ int monojob_wait ( const char *string ) { break; } } - if ( ( currticks() - last_progress_dot ) > TICKS_PER_SEC ) { + elapsed = ( currticks() - last_progress_dot ); + if ( elapsed > TICKS_PER_SEC ) { printf ( "." ); last_progress_dot = currticks(); } |