/systemd-251/src/analyze/ |
D | analyze-timestamp.c | 11 usec_t usec; in test_timestamp_one() local 14 r = parse_timestamp(p, &usec); in test_timestamp_one() 45 TABLE_TIMESTAMP, usec, in test_timestamp_one() 53 TABLE_TIMESTAMP_UTC, usec); in test_timestamp_one() 62 if (usec % USEC_PER_SEC == 0) in test_timestamp_one() 64 usec / USEC_PER_SEC); in test_timestamp_one() 67 usec / USEC_PER_SEC, in test_timestamp_one() 68 usec % USEC_PER_SEC); in test_timestamp_one() 74 TABLE_TIMESTAMP_RELATIVE, usec); in test_timestamp_one()
|
/systemd-251/src/fuzz/ |
D | fuzz-time-util.c | 11 usec_t usec; in LLVMFuzzerTestOneInput() local 18 (void) parse_timestamp(str, &usec); in LLVMFuzzerTestOneInput() 19 (void) parse_sec(str, &usec); in LLVMFuzzerTestOneInput() 20 (void) parse_sec_fix_0(str, &usec); in LLVMFuzzerTestOneInput() 21 (void) parse_sec_def_infinity(str, &usec); in LLVMFuzzerTestOneInput() 22 (void) parse_time(str, &usec, USEC_PER_SEC); in LLVMFuzzerTestOneInput() 23 (void) parse_nsec(str, &usec); in LLVMFuzzerTestOneInput()
|
D | fuzz-calendarspec.c | 40 usec_t usec = 0; in LLVMFuzzerTestOneInput() local 41 (void) parse_time(usecs, &usec, 1); in LLVMFuzzerTestOneInput() 47 log_debug("00: %s", strna(FORMAT_TIMESTAMP(usec))); in LLVMFuzzerTestOneInput() 49 r = calendar_spec_next_usec(cspec, usec, &usec); in LLVMFuzzerTestOneInput() 54 log_debug("%02u: %s", i, FORMAT_TIMESTAMP(usec)); in LLVMFuzzerTestOneInput()
|
/systemd-251/src/systemd/ |
D | sd-event.h | 73 typedef int (*sd_event_time_handler_t)(sd_event_source *s, uint64_t usec, void *userdata); 90 int sd_event_add_time(sd_event *e, sd_event_source **s, clockid_t clock, uint64_t usec, uint64_t ac… 91 int sd_event_add_time_relative(sd_event *e, sd_event_source **s, clockid_t clock, uint64_t usec, ui… 102 int sd_event_wait(sd_event *e, uint64_t usec); 104 int sd_event_run(sd_event *e, uint64_t usec); 108 int sd_event_now(sd_event *e, clockid_t clock, uint64_t *usec); 141 int sd_event_source_get_time(sd_event_source *s, uint64_t *usec); 142 int sd_event_source_set_time(sd_event_source *s, uint64_t usec); 143 int sd_event_source_set_time_relative(sd_event_source *s, uint64_t usec); 144 int sd_event_source_get_time_accuracy(sd_event_source *s, uint64_t *usec); [all …]
|
/systemd-251/src/shared/ |
D | calendarspec.c | 291 static bool chain_is_star(const CalendarComponent *c, bool usec) { in chain_is_star() argument 296 if (usec) in chain_is_star() 303 static void _format_chain(FILE *f, int space, const CalendarComponent *c, bool start, bool usec) { in _format_chain() argument 304 int d = usec ? (int) USEC_PER_SEC : 1; in _format_chain() 308 if (start && chain_is_star(c, usec)) { in _format_chain() 331 _format_chain(f, space, c->next, false, usec); in _format_chain() 335 static void format_chain(FILE *f, int space, const CalendarComponent *c, bool usec) { in format_chain() argument 336 _format_chain(f, space, c, /* start = */ true, usec); in format_chain() 519 static int parse_component_decimal(const char **p, bool usec, int *res) { in parse_component_decimal() argument 531 if (usec) { in parse_component_decimal() [all …]
|
D | serialize.c | 97 int serialize_usec(FILE *f, const char *key, usec_t usec) { in serialize_usec() argument 101 if (usec == USEC_INFINITY) in serialize_usec() 104 return serialize_item_format(f, key, USEC_FMT, usec); in serialize_usec()
|
/systemd-251/src/basic/ |
D | time-util.c | 503 usec_t usec; in format_timespan() member 548 if (t < table[i].usec) in format_timespan() 554 a = t / table[i].usec; in format_timespan() 555 b = t % table[i].usec; in format_timespan() 561 for (usec_t cc = table[i].usec; cc > 1; cc /= 10) in format_timespan() 607 static int parse_timestamp_impl(const char *t, usec_t *usec, bool with_tz) { in parse_timestamp_impl() argument 654 return parse_sec(t + 1, usec); in parse_timestamp_impl() 890 if (usec) in parse_timestamp_impl() 891 *usec = ret; in parse_timestamp_impl() 896 usec_t usec; member [all …]
|
D | xattr-util.c | 121 static int parse_crtime(le64_t le, usec_t *usec) { in parse_crtime() argument 124 assert(usec); in parse_crtime() 130 *usec = (usec_t) u; in parse_crtime() 197 int fd_setcrtime(int fd, usec_t usec) { in fd_setcrtime() argument 202 if (!timestamp_is_set(usec)) in fd_setcrtime() 203 usec = now(CLOCK_REALTIME); in fd_setcrtime() 205 le = htole64((uint64_t) usec); in fd_setcrtime()
|
D | time-util.h | 144 int parse_timestamp(const char *t, usec_t *usec); 146 int parse_sec(const char *t, usec_t *usec); 147 int parse_sec_fix_0(const char *t, usec_t *usec); 148 int parse_sec_def_infinity(const char *t, usec_t *usec); 149 int parse_time(const char *t, usec_t *usec, usec_t default_unit); 167 uint32_t usec_to_jiffies(usec_t usec);
|
/systemd-251/src/network/ |
D | networkd-radv.c | 226 static uint32_t usec_to_lifetime(usec_t usec) { in usec_to_lifetime() argument 229 if (usec == USEC_INFINITY) in usec_to_lifetime() 232 t = DIV_ROUND_UP(usec, USEC_PER_SEC); in usec_to_lifetime() 885 usec_t usec; in config_parse_prefix_lifetime() local 898 r = parse_sec(rvalue, &usec); in config_parse_prefix_lifetime() 905 if (usec != USEC_INFINITY && DIV_ROUND_UP(usec, USEC_PER_SEC) >= UINT32_MAX) { in config_parse_prefix_lifetime() 912 p->preferred_lifetime = usec; in config_parse_prefix_lifetime() 914 p->valid_lifetime = usec; in config_parse_prefix_lifetime() 1050 usec_t usec; in config_parse_route_prefix_lifetime() local 1063 r = parse_sec(rvalue, &usec); in config_parse_route_prefix_lifetime() [all …]
|
D | networkd-can.c | 230 usec_t usec, *restart_usec = data; in config_parse_can_restart_usec() local 238 r = parse_sec(rvalue, &usec); in config_parse_can_restart_usec() 245 if (usec != USEC_INFINITY && in config_parse_can_restart_usec() 246 DIV_ROUND_UP(usec, USEC_PER_MSEC) > UINT32_MAX) { in config_parse_can_restart_usec() 252 *restart_usec = usec; in config_parse_can_restart_usec()
|
/systemd-251/src/test/ |
D | test-xattr-util.c | 65 usec_t usec, k; in TEST() local 73 r = fd_getcrtime(fd, &usec); in TEST() 77 log_debug("btime: %s", FORMAT_TIMESTAMP(usec)); in TEST() 83 assert_se(fd_getcrtime(fd, &usec) >= 0); in TEST() 85 usec == 1519126446UL * USEC_PER_SEC); in TEST()
|
/systemd-251/src/core/ |
D | dbus-timer.c | 144 usec_t usec, in timer_add_one_monotonic_spec() argument 153 FORMAT_TIMESPAN(usec, USEC_PER_MSEC)); in timer_add_one_monotonic_spec() 161 .value = usec, in timer_add_one_monotonic_spec() 253 usec_t usec; in bus_timer_set_transient_property() local 260 while ((r = sd_bus_message_read(message, "(st)", &base_name, &usec)) > 0) { in bus_timer_set_transient_property() 268 r = timer_add_one_monotonic_spec(t, name, b, flags, usec, error); in bus_timer_set_transient_property() 332 usec_t usec; in bus_timer_set_transient_property() local 340 r = sd_bus_message_read(message, "t", &usec); in bus_timer_set_transient_property() 344 return timer_add_one_monotonic_spec(t, name, b, flags, usec, error); in bus_timer_set_transient_property()
|
D | scope.c | 31 static int scope_dispatch_timer(sd_event_source *source, usec_t usec, void *userdata); 70 static int scope_arm_timer(Scope *s, usec_t usec) { in scope_arm_timer() argument 76 r = sd_event_source_set_time(s->timer_event_source, usec); in scope_arm_timer() 83 if (usec == USEC_INFINITY) in scope_arm_timer() 90 usec, 0, in scope_arm_timer() 559 static int scope_dispatch_timer(sd_event_source *source, usec_t usec, void *userdata) { in scope_dispatch_timer() argument
|
/systemd-251/src/libsystemd/sd-event/ |
D | event-util.c | 15 uint64_t usec, in event_reset_time() argument 52 r = sd_event_source_set_time(*s, usec); in event_reset_time() 68 r = sd_event_add_time(e, s, clock, usec, accuracy, callback, userdata); in event_reset_time() 92 uint64_t usec, in event_reset_time_relative() argument 109 …return event_reset_time(e, s, clock, usec_add(usec_now, usec), accuracy, callback, userdata, prior… in event_reset_time_relative()
|
D | event-util.h | 12 uint64_t usec, 23 uint64_t usec,
|
D | sd-event.c | 1176 static int time_exit_callback(sd_event_source *s, uint64_t usec, void *userdata) { in time_exit_callback() argument 1233 uint64_t usec, in sd_event_add_time() argument 1269 s->time.next = usec; in sd_event_add_time() 1291 uint64_t usec, in sd_event_add_time_relative() argument 1306 if (usec >= USEC_INFINITY - t) in sd_event_add_time_relative() 1309 return sd_event_add_time(e, ret, clock, t + usec, accuracy, callback, userdata); in sd_event_add_time_relative() 2621 _public_ int sd_event_source_get_time(sd_event_source *s, uint64_t *usec) { in sd_event_source_get_time() argument 2623 assert_return(usec, -EINVAL); in sd_event_source_get_time() 2627 *usec = s->time.next; in sd_event_source_get_time() 2631 _public_ int sd_event_source_set_time(sd_event_source *s, uint64_t usec) { in sd_event_source_set_time() argument [all …]
|
/systemd-251/src/libsystemd/sd-netlink/ |
D | sd-netlink.c | 531 static usec_t calc_elapse(uint64_t usec) { in calc_elapse() argument 532 if (usec == UINT64_MAX) in calc_elapse() 535 if (usec == 0) in calc_elapse() 536 usec = NETLINK_DEFAULT_TIMEOUT_USEC; in calc_elapse() 538 return usec_add(now(CLOCK_MONOTONIC), usec); in calc_elapse() 604 uint64_t usec, in sd_netlink_call_async() argument 622 if (usec != UINT64_MAX) { in sd_netlink_call_async() 633 slot->reply_callback.timeout = calc_elapse(usec); in sd_netlink_call_async() 665 uint64_t usec, in sd_netlink_read() argument 674 timeout = calc_elapse(usec); in sd_netlink_read() [all …]
|
/systemd-251/src/import/ |
D | curl-util.c | 111 static int curl_glue_on_timer(sd_event_source *s, uint64_t usec, void *userdata) { in curl_glue_on_timer() argument 128 usec_t usec; in curl_glue_timer_callback() local 142 usec = (usec_t) timeout_ms * USEC_PER_MSEC + USEC_PER_MSEC - 1; in curl_glue_timer_callback() 145 if (sd_event_source_set_time_relative(g->timer, usec) < 0) in curl_glue_timer_callback() 151 …if (sd_event_add_time_relative(g->event, &g->timer, CLOCK_BOOTTIME, usec, 0, curl_glue_on_timer, g… in curl_glue_timer_callback()
|
/systemd-251/src/home/ |
D | user-record-util.c | 1198 uint64_t counter, usec; in user_record_good_authentication() local 1216 usec = now(CLOCK_REALTIME); in user_record_good_authentication() 1230 r = json_variant_set_field_unsigned(&z, "lastGoodAuthenticationUSec", usec); in user_record_good_authentication() 1246 h->last_good_authentication_usec = usec; in user_record_good_authentication() 1254 uint64_t counter, usec; in user_record_bad_authentication() local 1272 usec = now(CLOCK_REALTIME); in user_record_bad_authentication() 1286 r = json_variant_set_field_unsigned(&z, "lastBadAuthenticationUSec", usec); in user_record_bad_authentication() 1302 h->last_bad_authentication_usec = usec; in user_record_bad_authentication() 1310 usec_t usec, new_ratelimit_begin_usec, new_ratelimit_count; in user_record_ratelimit() local 1316 usec = now(CLOCK_REALTIME); in user_record_ratelimit() [all …]
|
/systemd-251/src/libsystemd-network/ |
D | sd-ipv4acd.c | 191 static int ipv4acd_on_timeout(sd_event_source *s, uint64_t usec, void *userdata); 193 static int ipv4acd_set_next_wakeup(sd_ipv4acd *acd, usec_t usec, usec_t random_usec) { in ipv4acd_set_next_wakeup() argument 198 next_timeout = usec; in ipv4acd_set_next_wakeup() 212 static int ipv4acd_on_timeout(sd_event_source *s, uint64_t usec, void *userdata) { in ipv4acd_on_timeout() argument
|
/systemd-251/src/boot/efi/ |
D | util.c | 231 void efivar_set_time_usec(const EFI_GUID *vendor, const CHAR16 *name, UINT64 usec) { in efivar_set_time_usec() argument 237 if (usec == 0) in efivar_set_time_usec() 238 usec = time_usec(); in efivar_set_time_usec() 239 if (usec == 0) in efivar_set_time_usec() 243 ValueToString(str, FALSE, usec); in efivar_set_time_usec()
|
/systemd-251/src/login/ |
D | logind-button.c | 121 static int long_press_of_power_key_handler(sd_event_source *e, uint64_t usec, void *userdata) { in long_press_of_power_key_handler() argument 137 static int long_press_of_reboot_key_handler(sd_event_source *e, uint64_t usec, void *userdata) { in long_press_of_reboot_key_handler() argument 153 static int long_press_of_suspend_key_handler(sd_event_source *e, uint64_t usec, void *userdata) { in long_press_of_suspend_key_handler() argument 169 static int long_press_of_hibernate_key_handler(sd_event_source *e, uint64_t usec, void *userdata) { in long_press_of_hibernate_key_handler() argument
|
/systemd-251/src/journal/ |
D | journald-kmsg.c | 104 unsigned long long usec; in dev_kmsg_record() local 173 r = safe_atollu(p, &usec); in dev_kmsg_record() 256 if (asprintf(&source_time, "_SOURCE_MONOTONIC_TIMESTAMP=%llu", usec) >= 0) in dev_kmsg_record()
|
/systemd-251/src/shutdown/ |
D | shutdown.c | 323 usec_t usec; in init_watchdog() local 325 r = safe_atou64(s, &usec); in init_watchdog() 329 (void) watchdog_setup(usec); in init_watchdog()
|