_pal_rtc_nanotime_store(tsc, base, rntp->scale, rntp->shift, rntp);
}
-static void
+void
rtc_nanotime_init(uint64_t base)
{
_rtc_nanotime_init(&pal_rtc_nanotime_info, base);
rtc_nanotime_init(base);
}
+void
+rtc_decrementer_configure(void) {
+ rtc_timer->rtc_config();
+}
/*
* rtclock_early_init() is called very early at boot to
* establish mach_absolute_time() and set it to zero.
}
void
-clock_gettimeofday_set_commpage(
- uint64_t abstime,
- uint64_t epoch,
- uint64_t offset,
- clock_sec_t *secs,
- clock_usec_t *microsecs)
+clock_gettimeofday_set_commpage(uint64_t abstime, uint64_t sec, uint64_t frac, uint64_t scale, uint64_t tick_per_sec)
{
- uint64_t now = abstime + offset;
- uint32_t remain;
-
- remain = _absolutetime_to_microtime(now, secs, microsecs);
-
- *secs += (clock_sec_t)epoch;
-
- commpage_set_timestamp(abstime - remain, *secs);
+ commpage_set_timestamp(abstime, sec, frac, scale, tick_per_sec);
}
void
return rtc_nanotime_read();
}
+uint64_t
+mach_approximate_time(void)
+{
+ return rtc_nanotime_read();
+}
+
void
clock_interval_to_absolutetime_interval(
uint32_t interval,