gettimeofday: gather variables into new struct
This commit is contained in:
@@ -211,16 +211,20 @@ static void time_init(void)
|
||||
ihk_mc_get_boot_time(&tv_sec, &tv_nsec);
|
||||
ns_per_kclock = ihk_mc_get_ns_per_tsc();
|
||||
|
||||
origin_ts.tv_sec = tv_sec;
|
||||
origin_ts.tv_nsec = tv_nsec;
|
||||
tod_data.origin.tv_sec = tv_sec;
|
||||
tod_data.origin.tv_nsec = tv_nsec;
|
||||
|
||||
if (ns_per_kclock) {
|
||||
clocks_per_sec = (1000L * NS_PER_SEC) / ns_per_kclock;
|
||||
tod_data.clocks_per_sec = (1000L * NS_PER_SEC) / ns_per_kclock;
|
||||
}
|
||||
|
||||
if (!ns_per_kclock) {
|
||||
gettime_local_support = 0;
|
||||
}
|
||||
|
||||
if (gettime_local_support) {
|
||||
tod_data.do_local = 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user