/freebsd/contrib/ntp/libntp/lib/isc/unix/ |
H A D | time.c | 88 unsigned int seconds, unsigned int nanoseconds) in isc_interval_set() argument 93 i->seconds = seconds; in isc_interval_set() 102 if (i->seconds == 0 && i->nanoseconds == 0) in isc_interval_iszero() 117 isc_time_set(isc_time_t *t, unsigned int seconds, unsigned int nanoseconds) { in isc_time_set() argument 121 t->seconds = seconds; in isc_time_set() 129 t->seconds = 0; in isc_time_settoepoch() 138 if (t->seconds == 0 && t->nanoseconds == 0) in isc_time_isepoch() 177 if (sizeof(tv.tv_sec) > sizeof(t->seconds) && in isc_time_now() 181 t->seconds = tv.tv_sec; in isc_time_now() 224 if ((tv.tv_sec > INT_MAX || i->seconds > INT_MAX) && in isc_time_nowplusinterval() [all …]
|
/freebsd/sys/net/route/ |
H A D | route_temporal.c | 86 int seconds; in expire_callout() local 98 seconds = (next_expire - time_uptime); in expire_callout() 99 if (seconds < 0) in expire_callout() 100 seconds = 0; in expire_callout() 101 callout_reset_sbt(&rnh->expire_callout, SBT_1S * seconds, in expire_callout() 126 int seconds; in tmproutes_update() local 138 seconds = (nh_expire - time_uptime); in tmproutes_update() 139 if (seconds < 0) in tmproutes_update() 140 seconds = 0; in tmproutes_update() 141 callout_reset_sbt(&rnh->expire_callout, SBT_1S * seconds, in tmproutes_update()
|
/freebsd/contrib/libucl/tests/ |
H A D | test_speed.c | 70 double start, end, seconds; in main() local 100 seconds = end - start; in main() 101 printf ("ucl: parsed input in %.4f seconds\n", seconds); in main() 112 seconds = end - start; in main() 113 printf ("ucl: emitted config in %.4f seconds\n", seconds); in main() 121 seconds = end - start; in main() 122 printf ("ucl: emitted json in %.4f seconds\n", seconds); in main() 130 seconds = end - start; in main() 131 printf ("ucl: emitted compact json in %.4f seconds\n", seconds); in main() 139 seconds = end - start; in main() [all …]
|
/freebsd/contrib/llvm-project/libcxx/include/__chrono/ |
H A D | time_zone.h | 69 return __get_info(chrono::time_point_cast<seconds>(__time)); in get_info() 74 return __get_info(chrono::time_point_cast<seconds>(__time)); in get_info() 80 …_LIBCPP_HIDE_FROM_ABI sys_time<common_type_t<_Duration, seconds>> to_sys(const local_time<_Duratio… in to_sys() 84 …return sys_time<common_type_t<_Duration, seconds>>{__time.time_since_epoch() - __info.first.offset… in to_sys() 103 [[nodiscard]] _LIBCPP_HIDE_FROM_ABI sys_time<common_type_t<_Duration, seconds>> 109 …return sys_time<common_type_t<_Duration, seconds>>{__time.time_since_epoch() - __info.first.offset… in to_sys() 114 …return sys_time<common_type_t<_Duration, seconds>>{__time.time_since_epoch() - __info.first.offset… in to_sys() 117 …return sys_time<common_type_t<_Duration, seconds>>{__time.time_since_epoch() - __info.second.offse… in to_sys() 133 [[nodiscard]] _LIBCPP_HIDE_FROM_ABI local_time<common_type_t<_Duration, seconds>> 135 using _Dp = common_type_t<_Duration, seconds>; in to_local() [all …]
|
/freebsd/contrib/tcpdump/ |
H A D | print-arista.c | 89 arista_print_date_hms_time(netdissect_options *ndo, uint32_t seconds, in arista_print_date_hms_time() argument 95 ts = seconds + (nanoseconds / 1000000000); in arista_print_date_hms_time() 120 uint64_t seconds; in arista_ethertype_print() local 142 seconds = GET_BE_U_4(bp); in arista_ethertype_print() 144 arista_print_date_hms_time(ndo, seconds, nanoseconds); in arista_ethertype_print() 148 seconds = GET_BE_U_2(bp); in arista_ethertype_print() 150 seconds += nanoseconds / 1000000000; in arista_ethertype_print() 152 ND_PRINT("%" PRIu64 ".%09u", seconds, nanoseconds); in arista_ethertype_print()
|
H A D | ntp.c | 54 time_t seconds; in p_ntp_time() local 58 seconds = (time_t)seconds_64bit; in p_ntp_time() 59 if (seconds != seconds_64bit) { in p_ntp_time() 68 "%Y-%m-%dT%H:%M:%SZ", gmtime(&seconds)); in p_ntp_time()
|
/freebsd/bin/sleep/ |
H A D | sleep.c | 93 double seconds; in main() local 106 seconds = 0; in main() 108 seconds += parse_interval(*argv++); in main() 109 if (seconds > INT_MAX) in main() 111 if (seconds < 1e-9) in main() 113 original = time_to_sleep.tv_sec = (time_t)seconds; in main() 114 time_to_sleep.tv_nsec = 1e9 * (seconds - time_to_sleep.tv_sec); in main()
|
/freebsd/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/ |
H A D | GDBRemoteClientBase.h | 40 bool SendAsyncSignal(int signo, std::chrono::seconds interrupt_timeout); 42 bool Interrupt(std::chrono::seconds interrupt_timeout); 46 llvm::StringRef payload, std::chrono::seconds interrupt_timeout, 59 std::chrono::seconds interrupt_timeout = std::chrono::seconds(0)); 68 std::chrono::seconds interrupt_timeout, 80 std::chrono::seconds interrupt_timeout = std::chrono::seconds(0)); 92 std::chrono::seconds m_interrupt_timeout;
|
/freebsd/usr.bin/rusers/ |
H A D | rusers.c | 102 int days, hours, minutes, seconds; in rusers_reply() local 133 seconds = idle; in rusers_reply() 134 days = seconds / (60 * 60 * 24); in rusers_reply() 135 seconds %= (60 * 60 * 24); in rusers_reply() 136 hours = seconds / (60 * 60); in rusers_reply() 137 seconds %= (60 * 60); in rusers_reply() 138 minutes = seconds / 60; in rusers_reply() 139 seconds %= 60; in rusers_reply() 141 sprintf(idle_time, "%d:%02d", minutes, seconds); in rusers_reply() 144 hours, minutes, seconds); in rusers_reply() [all …]
|
/freebsd/contrib/llvm-project/libcxx/src/ |
H A D | chrono.cpp | 101 static constexpr const seconds nt_to_unix_epoch{11644473600}; in __libcpp_system_clock_now() 123 return system_clock::time_point(seconds(tp.tv_sec) + microseconds(tp.tv_nsec / 1000)); 131 return system_clock::time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec)); 141 return time_t(duration_cast<seconds>(t.time_since_epoch()).count()); in to_time_t() 144 …point system_clock::from_time_t(time_t t) noexcept { return system_clock::time_point(seconds(t)); } in from_time_t() 167 return steady_clock::time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec)); in __libcpp_steady_clock_now() 188 auto seconds = counter.QuadPart / freq.QuadPart; in __libcpp_steady_clock_now() local 190 auto dur = seconds * nano::den + fractions * nano::den / freq.QuadPart; in __libcpp_steady_clock_now() 201 return steady_clock::time_point(seconds(ts.tv_sec) + nanoseconds(ts.tv_nsec)); in __libcpp_steady_clock_now() 221 return steady_clock::time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec)); in __libcpp_steady_clock_now()
|
/freebsd/usr.sbin/mfiutil/ |
H A D | mfi_cmd.c | 325 print_time_humanized(uint seconds) in print_time_humanized() argument 328 if (seconds > 3600) { in print_time_humanized() 329 printf("%u:", seconds / 3600); in print_time_humanized() 331 if (seconds > 60) { in print_time_humanized() 332 seconds %= 3600; in print_time_humanized() 333 printf("%02u:%02u", seconds / 60, seconds % 60); in print_time_humanized() 335 printf("%us", seconds); in print_time_humanized() 342 uint seconds; in mfi_display_progress() local 349 seconds = (0x10000 * (uint32_t)prog->elapsed_seconds) / in mfi_display_progress() 351 print_time_humanized(seconds); in mfi_display_progress()
|
/freebsd/contrib/unbound/sldns/ |
H A D | parseutil.c | 78 time_t seconds; in sldns_mktime_from_utc() local 91 seconds = minutes * 60 + tm->tm_sec; in sldns_mktime_from_utc() 93 return seconds; in sldns_mktime_from_utc() 216 uint32_t seconds = 0; in sldns_str2period() local 229 return seconds; in sldns_str2period() 236 return seconds; in sldns_str2period() 241 if(seconds > maxint-i) { in sldns_str2period() 245 seconds += i; in sldns_str2period() 250 if(i > maxint/60 || seconds > maxint-(i*60)) { in sldns_str2period() 254 seconds += i * 60; in sldns_str2period() [all …]
|
/freebsd/lib/libc/gen/ |
H A D | sleep.c | 44 __sleep(unsigned int seconds) in __sleep() argument 50 * Avoid overflow when `seconds' is huge. This assumes that in __sleep() 53 if (seconds > INT_MAX) in __sleep() 54 return (seconds - INT_MAX + __sleep(INT_MAX)); in __sleep() 56 time_to_sleep.tv_sec = seconds; in __sleep() 61 return (seconds); /* best guess */ in __sleep()
|
/freebsd/contrib/kyua/utils/ |
H A D | datetime.cpp | 62 seconds(0), in delta() 76 seconds(seconds_), in delta() 112 return seconds * 1000000 + useconds; in to_microseconds() 124 return seconds == other.seconds && useconds == other.useconds; in operator ==() 148 return seconds < other.seconds || in operator <() 149 (seconds == other.seconds && useconds < other.useconds); in operator <() 174 return seconds > other.seconds || in operator >() 175 (seconds == other.seconds && useconds > other.useconds); in operator >()
|
/freebsd/contrib/ntp/ntpd/ |
H A D | refclock_tsyncpci.c | 103 // be tracked as the number of seconds from this date/time. 143 unsigned int secsDouble; /* seconds floating pt */ 144 unsigned char seconds; /* seconds whole num */ member 178 unsigned int seconds; member 395 double seconds; in tsync_poll() local 518 /* Read the leap seconds info from the TSYNC-PCI device */ in tsync_poll() 590 // Pull seconds information from time object in tsync_poll() 591 seconds = (double) (TimeContext.timeObj.secsDouble); in tsync_poll() 592 seconds / in tsync_poll() [all...] |
/freebsd/crypto/openssh/ |
H A D | progressmeter.c | 133 int hours, minutes, seconds; in refresh_progress_meter() local 208 seconds = bytes_left / bytes_per_second; in refresh_progress_meter() 210 seconds = elapsed; in refresh_progress_meter() 212 hours = seconds / 3600; in refresh_progress_meter() 213 seconds -= hours * 3600; in refresh_progress_meter() 214 minutes = seconds / 60; in refresh_progress_meter() 215 seconds -= minutes * 60; in refresh_progress_meter() 219 hours, minutes, seconds); in refresh_progress_meter() 221 xextendf(&buf, NULL, " %02d:%02d", minutes, seconds); in refresh_progress_meter()
|
/freebsd/contrib/ldns/ |
H A D | duration.c | 68 duration->seconds = 0; in ldns_duration_create() 105 if (d1->seconds != d2->seconds) { in ldns_duration_compare() 106 return (int) (d1->seconds - d2->seconds); in ldns_duration_compare() 174 duration->seconds = (time_t) atoi(str+1); in ldns_duration_create_from_string() 227 if (d->hours || d->minutes || d->seconds) { in ldns_duration2string() 234 || dur_scan_print(&p, eob, 'S', d->seconds)) in ldns_duration2string() 251 period += (duration->seconds); in ldns_duration2time()
|
/freebsd/contrib/tzdata/ |
H A D | leapseconds | 1 # Allowance for leap seconds added to each time zone file. 6 # NIST/IERS format leap-seconds.list file, which can be copied from 7 # <https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list> 9 # <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>. 10 # For more about leap-seconds.list, please see 14 # The rules for leap seconds are specified in Annex 1 (Time scales) of: 20 # periodically uses leap seconds to keep UTC to within 0.9 s of UT1 28 # There were no leap seconds before 1972, as no official mechanism 30 # rotation. The first ("1 Jan 1972") data line in leap-seconds.list 34 # All leap-seconds are Stationary (S) at the given UTC time. [all …]
|
H A D | leap-seconds.list | 5 # clocks. UTC differs from TAI by an integer number of seconds; it is the basis 19 # Leap seconds are needed to keep the two time scales in agreement, i.e. UT1-UTC smaller 20 # than 0.9 seconds. Therefore, when necessary a "leap second" is applied to UTC. 21 # Since the adoption of this system in 1972 it has been necessary to add a number of seconds to UTC, 25 # all leap seconds have been positive (a second has been added to UTC). Based on what we know about 31 # leap second at a rate of 1 to 2 years. Since the year 2000 leap seconds are introduced with… 38 # Observatory. According to international agreements, leap seconds should be scheduled only for cer… 40 # and September. Since the introduction of leap seconds in 1972, only dates in June and December we… 55 # given in units of seconds since 1900.0. 75 # NTP timestamp (X parameter) is the number of seconds since 1900.0 [all …]
|
/freebsd/usr.bin/top/ |
H A D | utils.c | 237 format_time(long seconds) in format_time() argument 242 if (seconds < 0 || seconds > (99999l * 360l)) in format_time() 246 else if (seconds >= (1000l * 60l)) in format_time() 249 sprintf(result, "%5.1fH", (double)seconds / (double)(60l * 60l)); in format_time() 261 seconds / 60l, seconds % 60l); in format_time()
|
/freebsd/contrib/llvm-project/libcxx/src/experimental/ |
H A D | time_zone.cpp | 119 __format(const __tz::__continuation& __continuation, const string& __letters, seconds __save) { in __format() 181 [[nodiscard]] static sys_seconds __to_sys_seconds(year_month_day __ymd, seconds __seconds) { in __to_sys_seconds() 182 seconds __result = static_cast<sys_days>(__ymd).time_since_epoch() + __seconds; in __to_sys_seconds() 186 [[nodiscard]] static seconds __at_to_sys_seconds(const __tz::__continuation& __continuation) { in __at_to_sys_seconds() 194 return chrono::seconds{0}; in __at_to_sys_seconds() 196 return chrono::duration_cast<seconds>(__value.__time); in __at_to_sys_seconds() 200 return chrono::seconds{0}; in __at_to_sys_seconds() 269 …sys_seconds operator()(seconds __save) const noexcept { return __until_ - __needs_adjustment_ * __… in operator ()() 276 [[nodiscard]] static seconds __at_to_seconds(seconds __stdoff, const __tz::__rule& __rule) { in __at_to_seconds() 295 [[nodiscard]] static sys_seconds __from_to_sys_seconds(seconds __stdoff, const __tz::__rule& __rule… in __from_to_sys_seconds() [all …]
|
/freebsd/sys/fs/smbfs/ |
H A D | smbfs_subr.c | 52 smb_time_local2server(struct timespec *tsp, int tzoff, u_long *seconds) in smb_time_local2server() argument 54 *seconds = tsp->tv_sec - tzoff * 60 /*- tz_minuteswest * 60 - in smb_time_local2server() 59 smb_time_server2local(u_long seconds, int tzoff, struct timespec *tsp) in smb_time_server2local() argument 61 tsp->tv_sec = seconds + tzoff * 60; in smb_time_server2local() 81 u_long seconds; in smb_time_local2NT() local 83 smb_time_local2server(tsp, 0, &seconds); in smb_time_local2NT() 84 *nsec = (((int64_t)(seconds) & ~1) + DIFF1970TO1601) * (int64_t)10000000; in smb_time_local2NT()
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
H A D | xattrtest.c | 355 double seconds; in create_files() local 403 seconds = timeval_sub_seconds(&stop, &start); in create_files() 405 seconds, files / seconds); in create_files() 446 double seconds; in setxattrs() local 497 seconds = timeval_sub_seconds(&stop, &start); in setxattrs() 499 seconds, (files * xattrs) / seconds); in setxattrs() 523 double seconds; in getxattrs() local 598 seconds = timeval_sub_seconds(&stop, &start); in getxattrs() 600 seconds, (files * xattrs) / seconds); in getxattrs() 622 double seconds; in unlink_files() local [all …]
|
/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/predicates/ |
H A D | tst.predcache.ksh | 163 seconds=`date +%S` 165 if [ "$seconds" -ne "$last" ]; then 166 last=$seconds 186 seconds=`date +%S` 188 if [ "$seconds" -ne "$last" ]; then 189 last=$seconds
|
/freebsd/usr.sbin/ntp/ntpd/ |
H A D | leap-seconds | 5 # clocks. UTC differs from TAI by an integer number of seconds; it is the basis 19 # Leap seconds are needed to keep the two time scales in agreement, i.e. UT1-UTC smaller 20 # than 0.9 seconds. Therefore, when necessary a "leap second" is applied to UTC. 21 # Since the adoption of this system in 1972 it has been necessary to add a number of seconds to UTC, 25 # all leap seconds have been positive (a second has been added to UTC). Based on what we know about 31 # leap second at a rate of 1 to 2 years. Since the year 2000 leap seconds are introduced with… 38 # Observatory. According to international agreements, leap seconds should be scheduled only for cer… 40 # and September. Since the introduction of leap seconds in 1972, only dates in June and December we… 55 # given in units of seconds since 1900.0. 75 # NTP timestamp (X parameter) is the number of seconds since 1900.0 [all …]
|