mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 12:30:20 +03:00
[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().
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user