2022-06-17 10:59:56 -04:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2018-06-25 02:12:12 -04:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef _ESP_TIME_H
|
|
|
|
#define _ESP_TIME_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
#include_next <time.h>
|
|
|
|
|
|
|
|
#define _POSIX_TIMERS 1
|
2020-11-05 23:00:07 -05:00
|
|
|
#ifndef CLOCK_MONOTONIC
|
2018-06-25 02:12:12 -04:00
|
|
|
#define CLOCK_MONOTONIC (clockid_t)4
|
2020-11-05 23:00:07 -05:00
|
|
|
#endif
|
|
|
|
#ifndef CLOCK_BOOTTIME
|
2018-06-25 02:12:12 -04:00
|
|
|
#define CLOCK_BOOTTIME (clockid_t)4
|
2020-11-05 23:00:07 -05:00
|
|
|
#endif
|
2018-06-25 02:12:12 -04:00
|
|
|
|
2019-03-19 07:57:20 -04:00
|
|
|
int clock_settime(clockid_t clock_id, const struct timespec *tp);
|
|
|
|
int clock_gettime(clockid_t clock_id, struct timespec *tp);
|
|
|
|
int clock_getres(clockid_t clock_id, struct timespec *res);
|
2018-06-25 02:12:12 -04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* _ESP_TIME_H */
|