/* This is based on the wall_to_monotonic offset and the total suspend time. Calls to settimeofday will affect the value returned (which basically means that however wrong your real time clock is at boot time, you get the right time here).  */
void getboottime(struct timespec *ts)
/* This is based on the wall_to_monotonic offset and the total suspend time. Calls to settimeofday will affect the value returned (which basically means that however wrong your real time clock is at boot time, you get the right time here).  */
void getboottime(struct timespec *ts)
{
	struct timespec boottime = {
		.tv_sec = wall_to_monotonic.tv_sec + total_sleep_time.tv_sec,
		.tv_nsec = wall_to_monotonic.tv_nsec + total_sleep_time.tv_nsec
	};
	set_normalized_timespec(ts, -boottime.tv_sec, -boottime.tv_nsec);
}