summaryrefslogtreecommitdiffstats
path: root/ape/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ape/main.c')
-rw-r--r--ape/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ape/main.c b/ape/main.c
index 8a7fc86..740e689 100644
--- a/ape/main.c
+++ b/ape/main.c
@@ -55,6 +55,7 @@
#include <Ethernet.h>
#include <NCSI.h>
#include <NVRam.h>
+#include <Timer.h>
#include <ape_main.h>
#ifndef CXX_SIMULATOR
@@ -227,7 +228,7 @@ void handleBMCPacket(void)
// the RMU state machine can enter a stuck state.
// This can be seen as an InProgress for an unreasonable amount of time.
// In such a case, reset the RMU to recover.
- if (APE.Tick1khz.r32 - inProgressStartTime > RMU_WATCHDOG_TIMEOUT_MS)
+ if (Timer_didTimeElapsed1KHz(inProgressStartTime, RMU_WATCHDOG_TIMEOUT_MS))
{
printf("RMU Hang detected, resetting.\n");
initRMU();
@@ -237,7 +238,7 @@ void handleBMCPacket(void)
else
{
packetInProgress = true;
- inProgressStartTime = APE.Tick1khz.r32;
+ inProgressStartTime = Timer_getCurrentTime1KHz();
}
}
}
OpenPOWER on IntegriCloud