Пример #1
0
timestruc_t
tod_get(void)
{
	timestruc_t ts = tod_ops.tod_get();
	ts.tv_sec = tod_validate(ts.tv_sec);
	return (ts);
}
Пример #2
0
/*
 * Read the current time from the clock chip and convert to UNIX form.
 * Assumes that the year in the clock chip is valid.
 * Must be called with tod_lock held.
 */
timestruc_t
tod_get(void)
{
    timestruc_t ts;

    ASSERT(MUTEX_HELD(&tod_lock));

    ts = TODOP_GET(tod_ops);
    ts.tv_sec = tod_validate(ts.tv_sec);
    return (ts);
}