mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-10-20 05:25:04 +08:00
[libc] move clock_time to time.
This commit is contained in:
@@ -276,35 +276,4 @@ int pthread_barrier_init(pthread_barrier_t *barrier,
|
||||
|
||||
int pthread_barrier_wait(pthread_barrier_t *barrier);
|
||||
|
||||
/* posix clock and timer */
|
||||
#define MILLISECOND_PER_SECOND 1000UL
|
||||
#define MICROSECOND_PER_SECOND 1000000UL
|
||||
#define NANOSECOND_PER_SECOND 1000000000UL
|
||||
|
||||
#define MILLISECOND_PER_TICK (MILLISECOND_PER_SECOND / RT_TICK_PER_SECOND)
|
||||
#define MICROSECOND_PER_TICK (MICROSECOND_PER_SECOND / RT_TICK_PER_SECOND)
|
||||
#define NANOSECOND_PER_TICK (NANOSECOND_PER_SECOND / RT_TICK_PER_SECOND)
|
||||
|
||||
#ifndef CLOCK_REALTIME
|
||||
#define CLOCK_REALTIME 1
|
||||
#endif
|
||||
|
||||
#define CLOCK_CPUTIME_ID 2
|
||||
|
||||
#ifndef CLOCK_PROCESS_CPUTIME_ID
|
||||
#define CLOCK_PROCESS_CPUTIME_ID CLOCK_CPUTIME_ID
|
||||
#endif
|
||||
#ifndef CLOCK_THREAD_CPUTIME_ID
|
||||
#define CLOCK_THREAD_CPUTIME_ID CLOCK_CPUTIME_ID
|
||||
#endif
|
||||
|
||||
#ifndef CLOCK_MONOTONIC
|
||||
#define CLOCK_MONOTONIC 4
|
||||
#endif
|
||||
|
||||
int clock_getres (clockid_t clockid, struct timespec *res);
|
||||
int clock_gettime (clockid_t clockid, struct timespec *tp);
|
||||
int clock_settime (clockid_t clockid, const struct timespec *tp);
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user