libxtc
0.4.0
Async concurrency for C: Tokio + Seastar + BEAM, in one library
Loading...
Searching...
No Matches
os_time.h
1
/*-
2
* Copyright (c) 2026, The XTC Project
3
* Use of this source code is governed by the ISC License.
4
*
5
* src/inc/os_time.h
6
* Monotonic and wall-clock time, plus a sleep primitive.
7
* Times are nanoseconds in int64_t. See M1_CLAIMS.md, Tm1-Tm4.
8
*/
9
10
#ifndef XTC_OS_TIME_H
11
#define XTC_OS_TIME_H
12
13
#include <stdint.h>
14
15
#define XTC_NS_PER_SEC 1000000000LL
16
#define XTC_NS_PER_MS 1000000LL
17
#define XTC_NS_PER_US 1000LL
18
19
/*
20
* PUBLIC: int __os_clock_mono __P((int64_t *));
21
* PUBLIC: int __os_clock_real __P((int64_t *));
22
* PUBLIC: int __os_sleep_ns __P((int64_t));
23
*/
24
int
__os_clock_mono(int64_t *out_ns);
25
int
__os_clock_real(int64_t *out_ns);
26
int
__os_sleep_ns(int64_t ns);
27
28
#endif
/* XTC_OS_TIME_H */
src
inc
os_time.h
Generated by
1.9.8