/* Similar to POSIX clock_gettime() get the simulation time split in nsec and seconds where clock_type is one of RTC_CLOCK_*  */
void native_rtc_gettime(int clock_type, uint32_t *nsec, uint64_t *sec)
/* Similar to POSIX clock_gettime() get the simulation time split in nsec and seconds where clock_type is one of RTC_CLOCK_*  */
void native_rtc_gettime(int clock_type, uint32_t *nsec, uint64_t *sec)
{
	if (clock_type == RTC_CLOCK_BOOT || clock_type == RTC_CLOCK_REALTIME) {
		uint64_t us = native_rtc_gettime_us(clock_type);
		*nsec = (us % 1000000UL) * 1000U;
		*sec  = us / 1000000UL;
	} else {
		hwtimer_get_pseudohost_rtc_time(nsec, sec);
	}
}