* Notify the watchdog if not notified during the last 2.5s. */
| 442 | * Notify the watchdog if not notified during the last 2.5s. |
| 443 | */ |
| 444 | static void NotifyWatchdog() |
| 445 | { |
| 446 | double now = Utility::GetTime(); |
| 447 | |
| 448 | if (now - l_LastNotifiedWatchdog.load() >= 2.5) { |
| 449 | sd_notify(0, "WATCHDOG=1"); |
| 450 | l_LastNotifiedWatchdog.store(now); |
| 451 | } |
| 452 | } |
| 453 | #endif /* HAVE_SYSTEMD */ |
| 454 | |
| 455 | /** |
no test coverage detected