/illumos-gate/usr/src/uts/sun4u/io/ |
H A D | todmostek.c | 122 todinfo_t tod; in todm_get() local 130 tod.tod_year = BCD_TO_BYTE(CLOCK->clk_year) + YRBASE; in todm_get() 131 tod.tod_month = BCD_TO_BYTE(CLOCK->clk_month & 0x1f); in todm_get() 132 tod.tod_day = BCD_TO_BYTE(CLOCK->clk_day & 0x3f); in todm_get() 133 tod.tod_dow = BCD_TO_BYTE(CLOCK->clk_weekday & 0x7); in todm_get() 134 tod.tod_hour = BCD_TO_BYTE(CLOCK->clk_hour & 0x3f); in todm_get() 135 tod.tod_min = BCD_TO_BYTE(CLOCK->clk_min & 0x7f); in todm_get() 136 tod.tod_sec = BCD_TO_BYTE(CLOCK->clk_sec & 0x7f); in todm_get() 148 ts.tv_sec = tod_to_utc(tod); in todm_get() 161 todinfo_t tod = utc_to_tod(ts.tv_sec); in todm_set() local [all …]
|
H A D | todm5819p_rmc.c | 194 todinfo_t tod; in rtc_to_tod() local 200 tod.tod_year = rtc->rtc_year + (rtc->rtc_century * 100) - 1900; in rtc_to_tod() 201 tod.tod_month = rtc->rtc_mon; in rtc_to_tod() 202 tod.tod_day = rtc->rtc_dom; in rtc_to_tod() 203 tod.tod_dow = rtc->rtc_dow; in rtc_to_tod() 204 tod.tod_hour = rtc->rtc_hrs; in rtc_to_tod() 205 tod.tod_min = rtc->rtc_min; in rtc_to_tod() 206 tod.tod_sec = rtc->rtc_sec; in rtc_to_tod() 208 return (tod); in rtc_to_tod() 250 todinfo_t tod = utc_to_tod(ts.tv_sec); in todm5819p_rmc_set() local [all …]
|
H A D | todbq4802.c | 165 todinfo_t tod; in todbq4802_get() local 179 tod.tod_year = rtc.rtc_year + (rtc.rtc_century * 100) - 1900; in todbq4802_get() 180 tod.tod_month = rtc.rtc_mon; in todbq4802_get() 181 tod.tod_day = rtc.rtc_dom; in todbq4802_get() 182 tod.tod_dow = rtc.rtc_dow; in todbq4802_get() 183 tod.tod_hour = rtc.rtc_hrs; in todbq4802_get() 184 tod.tod_min = rtc.rtc_min; in todbq4802_get() 185 tod.tod_sec = rtc.rtc_sec; in todbq4802_get() 187 ts.tv_sec = tod_to_utc(tod); in todbq4802_get() 249 todinfo_t tod = utc_to_tod(ts.tv_sec); in todbq4802_set() local [all …]
|
H A D | todm5819.c | 179 todinfo_t tod; in rtc_to_tod() local 185 tod.tod_year = rtc->rtc_year + (rtc->rtc_century * 100) - 1900; in rtc_to_tod() 186 tod.tod_month = rtc->rtc_mon; in rtc_to_tod() 187 tod.tod_day = rtc->rtc_dom; in rtc_to_tod() 188 tod.tod_dow = rtc->rtc_dow; in rtc_to_tod() 189 tod.tod_hour = rtc->rtc_hrs; in rtc_to_tod() 190 tod.tod_min = rtc->rtc_min; in rtc_to_tod() 191 tod.tod_sec = rtc->rtc_sec; in rtc_to_tod() 193 return (tod); in rtc_to_tod() 246 todinfo_t tod = utc_to_tod(ts.tv_sec); in todm5819_set() local [all …]
|
H A D | todds1287.c | 825 todinfo_t tod; in todds_get() local 838 tod.tod_year = rtc.rtc_year + (rtc.rtc_century * 100) - 1900; in todds_get() 839 tod.tod_month = rtc.rtc_mon; in todds_get() 840 tod.tod_day = rtc.rtc_dom; in todds_get() 841 tod.tod_dow = rtc.rtc_dow; in todds_get() 842 tod.tod_hour = rtc.rtc_hrs; in todds_get() 843 tod.tod_min = rtc.rtc_min; in todds_get() 844 tod.tod_sec = rtc.rtc_sec; in todds_get() 846 ts.tv_sec = tod_to_utc(tod); in todds_get() 952 todinfo_t tod = utc_to_tod(ts.tv_sec); in todds_set() local [all …]
|
H A D | todds1337.c | 396 todinfo_t tod; in todds1337_get() local 415 tod.tod_year = rtc.rtc_year; in todds1337_get() 417 tod.tod_year += 100; in todds1337_get() 418 tod.tod_month = rtc.rtc_mon; in todds1337_get() 419 tod.tod_day = rtc.rtc_dom; in todds1337_get() 420 tod.tod_dow = rtc.rtc_dow; in todds1337_get() 421 tod.tod_hour = rtc.rtc_hrs; in todds1337_get() 422 tod.tod_min = rtc.rtc_min; in todds1337_get() 423 tod.tod_sec = rtc.rtc_sec; in todds1337_get() 428 ts.tv_sec = tod_to_utc(tod); in todds1337_get() [all …]
|
/illumos-gate/usr/src/uts/i86pc/io/ |
H A D | todpc_subr.c | 134 todinfo_t tod = utc_to_tod(ts.tv_sec - ggmtl()); in todpc_set() local 147 tod.tod_year -= YRBASE; in todpc_set() 148 if (tod.tod_year >= 100) { in todpc_set() 149 tod.tod_year -= 100; in todpc_set() 153 rtc.rtc_yr = BYTE_TO_BCD(tod.tod_year); in todpc_set() 154 rtc.rtc_mon = BYTE_TO_BCD(tod.tod_month); in todpc_set() 155 rtc.rtc_dom = BYTE_TO_BCD(tod.tod_day); in todpc_set() 157 rtc.rtc_dow = (unsigned char)tod.tod_dow; in todpc_set() 158 rtc.rtc_hr = BYTE_TO_BCD(tod.tod_hour); in todpc_set() 159 rtc.rtc_min = BYTE_TO_BCD(tod.tod_min); in todpc_set() [all …]
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | timers.c | 1398 todinfo_t tod; in utc_to_tod() local 1418 tod.tod_sec = utc % 60; in utc_to_tod() 1419 tod.tod_min = (utc % 3600) / 60; in utc_to_tod() 1420 tod.tod_hour = (utc % 86400) / 3600; in utc_to_tod() 1421 tod.tod_dow = (dse + 4) % 7 + 1; /* epoch was a Thursday */ in utc_to_tod() 1433 tod.tod_day = day - days_thru_month[month] + 1; in utc_to_tod() 1434 tod.tod_month = month & 15; in utc_to_tod() 1435 tod.tod_year = year; in utc_to_tod() 1437 saved_tod = tod; in utc_to_tod() 1438 return (tod); in utc_to_tod() [all …]
|
H A D | clock.c | 641 timestruc_t tod; in clock() local 789 tod = tod_get(); in clock() 790 drift = tod.tv_sec - hrestime.tv_sec; in clock() 797 hrestime = tod; in clock() 808 gethrestime(&tod); in clock() 809 tod_set(tod); in clock() 2162 tod_validate(time_t tod) in tod_validate() argument 2193 return (tod); in tod_validate() 2203 prev_tod = tod; in tod_validate() 2205 return (tod); in tod_validate() [all …]
|
H A D | fm.c | 413 timespec_t tod; in fm_banner() local 420 tod = panic_hrestime; in fm_banner() 423 gethrestime(&tod); in fm_banner() 433 fm_msgid, tod.tv_sec, tod.tv_nsec, (u_longlong_t)now); in fm_banner() 466 timespec_t tod; in fm_ereport_dump() local 472 tod = panic_hrestime; in fm_ereport_dump() 477 gethrestime(&tod); in fm_ereport_dump() 498 ed.ed_tod_base.sec = tod.tv_sec; in fm_ereport_dump() 499 ed.ed_tod_base.nsec = tod.tv_nsec; in fm_ereport_dump()
|
/illumos-gate/usr/src/uts/i86xpv/io/ |
H A D | xpvtod.c | 46 todinfo_t tod; in todxen_get() local 86 tod = utc_to_tod(ts.tv_sec); in todxen_get() 87 if (tod.tod_year < 69) { in todxen_get() 102 if (tod.tod_year > 38) in todxen_get() 108 tod.tod_year += 100; in todxen_get() 109 ts.tv_sec = tod_to_utc(tod); in todxen_get()
|
/illumos-gate/usr/src/lib/smbsrv/libmlsvc/common/ |
H A D | srvsvc_clnt.c | 474 struct mslm_TIME_OF_DAY_INFO *tod; in srvsvc_net_remote_tod() local 509 tod = arg.bufptr; in srvsvc_net_remote_tod() 512 tv->tv_sec = tod->tod_elapsedt; in srvsvc_net_remote_tod() 513 tv->tv_usec = tod->tod_msecs; in srvsvc_net_remote_tod() 517 tm->tm_sec = tod->tod_secs; in srvsvc_net_remote_tod() 518 tm->tm_min = tod->tod_mins; in srvsvc_net_remote_tod() 519 tm->tm_hour = tod->tod_hours; in srvsvc_net_remote_tod() 520 tm->tm_mday = tod->tod_day; in srvsvc_net_remote_tod() 521 tm->tm_mon = tod->tod_month - 1; in srvsvc_net_remote_tod() 522 tm->tm_year = tod->tod_year - 1900; in srvsvc_net_remote_tod() [all …]
|
/illumos-gate/usr/src/cmd/fm/fmd/common/ |
H A D | fmd_event.c | 58 uint64_t *tod; in fmd_event_nvunwrap() local 69 FMD_EVN_TOD, &tod, &n) == 0 && n >= 2) in fmd_event_nvunwrap() 70 ep->ev_time = *(const fmd_timeval_t *)tod; in fmd_event_nvunwrap() 81 fmd_timeval_t tod; in fmd_event_recreate() local 117 fmd_time_sync(&tod, &hr0, 1); in fmd_event_recreate() 118 fmd_time_tod2hrt(hr0, &tod, &ep->ev_time, &ep->ev_hrt); in fmd_event_recreate() 129 fmd_timeval_t tod; in fmd_event_create() local 152 fmd_time_sync(&tod, &hr0, 1); in fmd_event_create() 167 fmd_time_hrt2tod(hr0, &tod, hrt, &ep->ev_time); in fmd_event_create()
|
H A D | fmd_time.c | 87 struct timeval tod; in fmd_time_sync() local 90 (void) ftop->fto_gettimeofday(&tod, NULL); in fmd_time_sync() 97 todbase = tod; in fmd_time_sync() 257 hrtime_t tod, hrt, sec, rem; in fmd_simulator_tod() local 261 tod = fts->fts_tod; in fmd_simulator_tod() 266 sec = tod / NANOSEC + hrt / NANOSEC; in fmd_simulator_tod() 267 rem = tod % NANOSEC + hrt % NANOSEC; in fmd_simulator_tod()
|
H A D | fmd_protocol.c | 147 int64_t tod[2]; in fmd_protocol_list() local 153 tod[0] = tvp->tv_sec; in fmd_protocol_list() 154 tod[1] = tvp->tv_usec; in fmd_protocol_list() 163 err |= nvlist_add_int64_array(nvl, FM_SUSPECT_DIAG_TIME, tod, 2); in fmd_protocol_list() 217 int64_t tod[2]; in fmd_protocol_rsrc_asru() local 220 tod[0] = tvp->tv_sec; in fmd_protocol_rsrc_asru() 221 tod[1] = tvp->tv_usec; in fmd_protocol_rsrc_asru() 244 err |= nvlist_add_int64_array(nvl, FM_SUSPECT_DIAG_TIME, tod, 2); in fmd_protocol_rsrc_asru()
|
H A D | fmd_sysevent.c | 284 fmd_timeval_t ftv, tod; in sysev_replay() local 378 tod.ftv_sec = ed.ed_tod_base.sec; in sysev_replay() 379 tod.ftv_nsec = ed.ed_tod_base.nsec; in sysev_replay() 380 fmd_time_hrt2tod(ed.ed_hrt_base, &tod, hrt, &ftv); in sysev_replay()
|
/illumos-gate/usr/src/uts/common/syscall/ |
H A D | ntptime.c | 76 timestruc_t tod; in ntp_gettime() local 80 gethrestime(&tod); in ntp_gettime() 81 if (tod.tv_sec > TIME32_MAX) in ntp_gettime() 83 ntv.time.tv_sec = tod.tv_sec; in ntp_gettime() 84 ntv.time.tv_usec = tod.tv_nsec / (NANOSEC / MICROSEC); in ntp_gettime()
|
/illumos-gate/usr/src/cmd/valtools/ |
H A D | cktime.c | 123 char *tod; in main() local 238 tod = (char *)malloc(len); in main() 239 if (!tod) { in main() 244 n = cktime(tod, fmt, deflt, error, help, prompt); in main() 250 (void) fputs(tod, stdout); in main()
|
/illumos-gate/usr/src/cmd/krb5/kwarn/ |
H A D | kwarnd_send.c | 78 time_t tod; in warn_send() local 130 time(&tod); in warn_send() 131 cftime(time_buf, "%c", &tod); in warn_send()
|
/illumos-gate/usr/src/lib/fm/libfmevent/common/ |
H A D | fmev_evaccess.c | 72 uint64_t *tod; in fmev_sysev2fmev() local 97 if (nvlist_lookup_uint64_array(iep->ei_nvl, "__tod", &tod, in fmev_sysev2fmev() 105 iep->ei_fmtime[FM_TIME_SEC] = tod[0]; in fmev_sysev2fmev() 106 iep->ei_fmtime[FM_TIME_NSEC] = tod[1]; in fmev_sysev2fmev()
|
/illumos-gate/usr/src/cmd/fm/modules/common/zfs-diagnosis/ |
H A D | zfs_de.c | 243 uint64_t *tod; in zfs_mark_pool() local 266 &tod, &nelem); in zfs_mark_pool() 268 loaded.ertv_sec = tod[0]; in zfs_mark_pool() 269 loaded.ertv_nsec = tod[1]; in zfs_mark_pool() 323 uint64_t *tod; in zpool_find_load_time() local 344 &tod, &nelem) == 0 && nelem == 2) { in zpool_find_load_time() 346 lta->lt_time->ertv_sec = tod[0]; in zpool_find_load_time() 347 lta->lt_time->ertv_nsec = tod[1]; in zpool_find_load_time() 540 uint64_t *tod; in zfs_ereport_when() local 543 if (nvlist_lookup_uint64_array(nvl, FMD_EVN_TOD, &tod, &nelem) == 0 && in zfs_ereport_when() [all …]
|
/illumos-gate/usr/src/cmd/fm/fmdump/common/ |
H A D | fmdump.c | 147 time_t tod = (time_t)rp->rec_sec; in fmdump_date() local 149 if (tod > now+60 || in fmdump_date() 150 tod < now - 6L*30L*24L*60L*60L) { /* 6 months ago */ in fmdump_date() 152 localtime(&tod)); in fmdump_date() 155 sz = strftime(buf, len, "%b %d %T", localtime(&tod)); in fmdump_date() 173 time_t tod = (time_t)rp->rec_sec; in fmdump_year() local 174 (void) strftime(buf, len, "%b %d %Y %T", localtime(&tod)); in fmdump_year() 261 struct timeval tod; in gettimeopt() local 268 if (gettimeofday(&tod, NULL) != 0) in gettimeopt() 320 if (tvp->tv_sec > tod.tv_sec) in gettimeopt() [all …]
|
/illumos-gate/usr/src/lib/libadm/common/ |
H A D | cktime.c | 349 cktime(char *tod, char *fmt, char *defstr, char *error, char *help, in cktime() argument 371 (void) strcpy(tod, defstr); in cktime() 388 (void) strcpy(tod, input); in cktime()
|
/illumos-gate/usr/src/cmd/krb5/kadmin/cli/ |
H A D | getdate.y | 646 time_t tod; local 670 if ((tod = ToSeconds(Hours, Minutes, Seconds, Meridian)) < 0) 672 Julian += tod; 927 time_t tod; local 1054 tod = RelativeDate(Start, yyDayOrdinal, yyDayNumber); 1055 Start += tod;
|
/illumos-gate/usr/src/cmd/backup/lib/ |
H A D | getdate.y | 528 time_t tod; local 550 if ((tod = ToSeconds(Hours, Minutes, Seconds, Meridian)) < 0) 552 Julian += tod; 856 time_t tod; local 942 tod = RelativeDate(Start, yyDayOrdinal, yyDayNumber); 943 Start += tod;
|