shared: watchdog_get_last_ping_as_dual_timestamp()
This commit is contained in:
@@ -206,6 +206,15 @@ usec_t watchdog_get_last_ping(clockid_t clock) {
|
||||
return map_clock_usec(watchdog_last_good_ping, CLOCK_BOOTTIME, clock);
|
||||
}
|
||||
|
||||
dual_timestamp* watchdog_get_last_ping_as_dual_timestamp(dual_timestamp *ret) {
|
||||
assert(ret);
|
||||
|
||||
ret->monotonic = watchdog_get_last_ping(CLOCK_MONOTONIC);
|
||||
ret->realtime = watchdog_get_last_ping(CLOCK_REALTIME);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int watchdog_ping_now(void) {
|
||||
int r;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
const char* watchdog_get_device(void);
|
||||
usec_t watchdog_get_last_ping(clockid_t clock);
|
||||
dual_timestamp* watchdog_get_last_ping_as_dual_timestamp(dual_timestamp *ret);
|
||||
|
||||
int watchdog_set_device(const char *path);
|
||||
int watchdog_setup(usec_t timeout);
|
||||
|
||||
Reference in New Issue
Block a user