time_t getsecs(void) { struct mvmeprom_time m; mvmeprom_rtc_rd(&m); return (chiptotime(m.sec_BCD, m.min_BCD, m.hour_BCD, m.day_BCD, m.month_BCD, m.year_BCD)); }
satime_t getsecs(void) { struct bug_rtc_rd rr; bugsys_rtc_rd(&rr); return (chiptotime(rr.rr_second, rr.rr_minute, rr.rr_hour, rr.rr_dayofmonth, rr.rr_month, rr.rr_year)); }
/* * Set up the system's time, given a `reasonable' time value. */ u_long ttime(void) { register struct clockreg *cl = clockreg; int sec, min, hour, day, mon, year; cl->cl_csr |= CLK_READ; /* enable read (stop time) */ sec = cl->cl_sec; min = cl->cl_min; hour = cl->cl_hour; day = cl->cl_mday; mon = cl->cl_month; year = cl->cl_year; cl->cl_csr &= ~CLK_READ;/* time wears on */ return (chiptotime(sec, min, hour, day, mon, year)); }