gettimeofday(): an implementation based on CPU invariant TSC support
This commit is contained in:
@@ -71,6 +71,11 @@ struct cpu_local_var {
|
||||
int in_interrupt;
|
||||
int no_preempt;
|
||||
int timer_enabled;
|
||||
|
||||
unsigned long tv_sec;
|
||||
unsigned long tv_nsec;
|
||||
unsigned long last_tsc;
|
||||
|
||||
} __attribute__((aligned(64)));
|
||||
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#ifndef __TIME_H
|
||||
#define __TIME_H
|
||||
|
||||
#define NS_PER_SEC 1000000000UL
|
||||
|
||||
typedef long int __time_t;
|
||||
|
||||
/* POSIX.1b structure for a time value. This is like a `struct timeval' but
|
||||
|
||||
Reference in New Issue
Block a user