1 /*
2  * SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #pragma once
8 
9 #include <sys/types.h>
10 
11 #include_next <time.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 #define _POSIX_TIMERS 1
18 #ifndef CLOCK_MONOTONIC
19 #define CLOCK_MONOTONIC (clockid_t)4
20 #endif
21 #ifndef CLOCK_BOOTTIME
22 #define CLOCK_BOOTTIME (clockid_t)4
23 #endif
24 
25 int clock_settime(clockid_t clock_id, const struct timespec *tp);
26 int clock_gettime(clockid_t clock_id, struct timespec *tp);
27 int clock_getres(clockid_t clock_id, struct timespec *res);
28 
29 #ifdef __cplusplus
30 }
31 #endif
32