2022-06-17 16:59:56 +02:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2018-06-25 11:12:12 +05:00
|
|
|
|
2022-07-04 11:53:42 +02:00
|
|
|
#pragma once
|
2018-06-25 11:12:12 +05:00
|
|
|
|
2022-07-04 11:53:42 +02:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
#include_next <time.h>
|
2018-06-25 11:12:12 +05:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define _POSIX_TIMERS 1
|
2020-11-06 15:00:07 +11:00
|
|
|
#ifndef CLOCK_MONOTONIC
|
2018-06-25 11:12:12 +05:00
|
|
|
#define CLOCK_MONOTONIC (clockid_t)4
|
2020-11-06 15:00:07 +11:00
|
|
|
#endif
|
|
|
|
#ifndef CLOCK_BOOTTIME
|
2018-06-25 11:12:12 +05:00
|
|
|
#define CLOCK_BOOTTIME (clockid_t)4
|
2020-11-06 15:00:07 +11:00
|
|
|
#endif
|
2018-06-25 11:12:12 +05:00
|
|
|
|
2019-03-19 19:57:20 +08: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 11:12:12 +05:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|