summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/drm/include/linux/timekeeping.h
blob: a2a6828e966cff7aa18763da68554db6f985ca56 (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
30
/* 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 struct timeval
ktime_get_real(void)
{
	struct timeval tv;
	microtime(&tv);
	return tv;
}

static inline uint64_t
ktime_get_ns(void)
{
	struct timeval tv = ktime_get();
	return timeval_to_ns(&tv);
}

#endif