XenevaOS
Loading...
Searching...
No Matches
ktime.h
Go to the documentation of this file.
1#ifndef __LINUX_KTIME_H__
2#define __LINUX_KTIME_H__
3
4/*
5 * DCL <linux/ktime.h> -- nanosecond timestamps.
6 *
7 * Nearly everything a ported file asks of ktime already lives in
8 * <linux/kernel.h>: ktime_t, ktime_get() -- which reads the same generic
9 * timer udelay() burns against, so timestamps and delays agree instead of
10 * coming from two clocks -- and the ktime_add / ktime_sub / ktime_to_ns /
11 * ns_to_ktime / ms_to_ktime family.
12 *
13 * The first draft of this header re-declared all of them anyway, and the
14 * compile rejected it as redefinitions the moment both headers were included.
15 * That is the whole point of DCL/linux_irq_shim.c including every header it
16 * can reach: a header nothing parses is a header nobody has checked, and
17 * duplicating an existing API is exactly the mistake a writer of a new header
18 * makes. So this file adds one symbol, and re-exports the rest.
19 *
20 * ktime_get_real_seconds() is the one call kernel.h cannot answer: seconds
21 * since boot, because Xeneva carries no RTC-backed wall clock to read, and
22 * tty_io.c:800 only stamps a "first opened" time for a deprecation warning --
23 * a monotonic figure is the right answer there (a made-up epoch would be
24 * worse than an honest relative one). Body in DCL/linux_irq_shim.c.
25 */
26
27#include <linux/kernel.h>
28
29long long ktime_get_real_seconds(void);
30
31#endif /* __LINUX_KTIME_H__ */
long long ktime_get_real_seconds(void)