Esempio n. 1
0
/**
 * panic_display_time
 */
void panic_display_time(void)
{
    clock_sec_t secs;
    clock_usec_t usecs;

    /*
     * Header. 
     */
    kdb_printf("Epoch Time:        sec       usec\n");

    /*
     * Boot. 
     */
    clock_get_boottime_nanotime(&secs, &usecs);
    kdb_printf("  Boot    : 0x%08x 0x%08x\n", secs, usecs);
    kdb_printf("  Sleep   : 0x%08x 0x%08x\n", gIOLastSleepTime.tv_sec,
               gIOLastSleepTime.tv_usec);
    kdb_printf("  Wake    : 0x%08x 0x%08x\n", gIOLastWakeTime.tv_sec,
               gIOLastWakeTime.tv_usec);

    /*
     * Uptime. 
     */
    clock_get_calendar_microtime(&secs, &secs);
    kdb_printf("  Calendar: 0x%08x 0x%08x\n\n", secs, usecs);

    return;
}
Esempio n. 2
0
void IOKitResetTime( void )
{
    clock_sec_t		secs;
	clock_usec_t	microsecs;

    clock_initialize_calendar();

    clock_get_calendar_microtime(&secs, &microsecs);
    gIOLastWakeTime.tv_sec  = secs;
    gIOLastWakeTime.tv_usec = microsecs;

    IOService::updateConsoleUsers(NULL, kIOMessageSystemHasPoweredOn);
}
Esempio n. 3
0
uint64_t
    rpal_time_getLocal
    (

    )
{
    clock_sec_t ts = 0;
    unsigned int ms = 0;
    
    clock_get_calendar_microtime( &ts, &ms );
    
    return ts;
}