master
h 20 lines 470 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #ifndef NETDATA_BOOTTIME_H
4 #define NETDATA_BOOTTIME_H
5
6 #include "libnetdata/libnetdata-base.h"
7 #include <time.h>
8
9 /**
10 * Get system boot time
11 *
12 * Returns the absolute wallclock timestamp (Unix epoch) of when the system was last booted.
13 * The value is cached after first successful call.
14 * Returns 0 on error.
15 *
16 * @return time_t The boot timestamp, 0 on error
17 */
18 time_t os_boottime(void);
19
20 #endif //NETDATA_BOOTTIME_H