This source file includes following definitions.
- opal_sys_timer_get_cycles
1
2
3
4
5
6
7
8
9
10
11
12 #ifndef OPAL_SYS_ARCH_TIMER_H
13 #define OPAL_SYS_ARCH_TIMER_H 1
14
15 #include <sys/times.h>
16
17 typedef uint64_t opal_timer_t;
18
19 static inline opal_timer_t
20 opal_sys_timer_get_cycles(void)
21 {
22 opal_timer_t ret;
23 struct tms accurate_clock;
24
25 times(&accurate_clock);
26 ret = accurate_clock.tms_utime + accurate_clock.tms_stime;
27
28 return ret;
29 }
30
31 #define OPAL_HAVE_SYS_TIMER_GET_CYCLES 1
32
33 #endif