gettimeofday: gather variables into new struct

This commit is contained in:
NAKAMURA Gou
2015-11-11 17:19:10 +09:00
parent 4c181d7fc0
commit 1a5ff7f535
3 changed files with 37 additions and 26 deletions

View File

@@ -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;
}