summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/drm/include/linux/timekeeping.h
blob: 1a4421b55af41377343b95caf26bac97f80b6f4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* Public domain. */

#ifndef _LINUX_TIMEKEEPING_H
#define _LINUX_TIMEKEEPING_H

#define ktime_get_boottime()	ktime_get()
#define get_seconds()		gettime()

static inline time_t
ktime_get_real_seconds(void)
{
	return gettime();
}

static inline ktime_t
ktime_get_real(void)
{
	struct timespec ts;
	nanotime(&ts);
	return TIMESPEC_TO_NSEC(&ts);
}

static inline uint64_t
ktime_get_ns(void)
{
	return ktime_get();
}

#endif