aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2021-05-12 08:59:04 +0000
committerKyle Evans <kevans@FreeBSD.org>2021-10-08 01:16:00 +0000
commit869ec7d90917e3f6c6c7829e0e47703a2a27c69e (patch)
treea60bb95b4de921c431103154f36d0a83e96e0747
parent4d1e0b5bcd819c0f0061d85aebb5e3c408df7946 (diff)
downloadsrc-869ec7d90917e3f6c6c7829e0e47703a2a27c69e.tar.gz
src-869ec7d90917e3f6c6c7829e0e47703a2a27c69e.zip
Update the EFI timer to be called once a second
There is no need to call it evert 10ms when we need 1s granularity. Update to update the time every second. (cherry picked from commit 93f7be080f3ad0bd71190d87aa2043d714270206)
-rw-r--r--stand/efi/libefi/time_event.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/stand/efi/libefi/time_event.c b/stand/efi/libefi/time_event.c
index f96f1d845f6a..f171bf997078 100644
--- a/stand/efi/libefi/time_event.c
+++ b/stand/efi/libefi/time_event.c
@@ -40,7 +40,7 @@ static void
time_update(EFI_EVENT event, void *context)
{
- curtime += 10;
+ curtime++;
}
void
@@ -50,8 +50,8 @@ efi_time_init(void)
/* Create a timer event */
BS->CreateEvent(EVT_TIMER | EVT_NOTIFY_SIGNAL, TPL_CALLBACK,
time_update, 0, &time_event);
- /* Use a 10ms timer */
- BS->SetTimer(time_event, TimerPeriodic, 100000);
+ /* Use a 1s timer */
+ BS->SetTimer(time_event, TimerPeriodic, 10000000);
}
void
@@ -68,7 +68,7 @@ time(time_t *tloc)
{
time_t t;
- t = curtime / 1000;
+ t = curtime;
if (tloc != NULL)
*tloc = t;