linux: Rework timer_check_periodic() to use ticks

Avoid using a 'struct timespec' to simplify the code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2021-04-19 09:15:28 -04:00
parent e0aba590f9
commit 8f9e497d69
3 changed files with 14 additions and 14 deletions

View File

@@ -26,7 +26,7 @@ watchdog_setup(void)
void
watchdog_task(void)
{
static struct timespec next_watchdog_time;
static uint32_t next_watchdog_time;
if (watchdog_fd < 0 || !timer_check_periodic(&next_watchdog_time))
return;
int ret = write(watchdog_fd, ".", 1);