/external/ltrace/ |
D | summary.c | 38 struct timeval tv; member 49 struct timeval tv; member 57 struct timeval tv; in calc_time_spent() local 58 gettimeofday(&tv, NULL); in calc_time_spent() 61 diff.tv_sec = tv.tv_sec - start.tv_sec; in calc_time_spent() 62 if (tv.tv_usec >= start.tv_usec) { in calc_time_spent() 63 diff.tv_usec = tv.tv_usec - start.tv_usec; in calc_time_spent() 66 diff.tv_usec = 1000000 + tv.tv_usec - start.tv_usec; in calc_time_spent() 77 struct entry_st entry = { *namep, st->count, st->tv }; in fill_struct() 82 data->tot_usecs += 1000000 * st->tv.tv_sec; in fill_struct() [all …]
|
/external/bison/lib/ |
D | timevar.c | 287 struct timevar_def *tv = &timevars[timevar]; local 295 tv->used = 1; 298 if (tv->standalone) 325 context->timevar = tv; 376 struct timevar_def *tv = &timevars[timevar]; local 382 tv->used = 1; 386 if (tv->standalone) 388 tv->standalone = 1; 390 get_time (&tv->start_time); 400 struct timevar_def *tv = &timevars[timevar]; local [all …]
|
/external/strace/tests/ |
D | xettimeofday.c | 38 struct timeval tv; in main() member 47 if (syscall(__NR_gettimeofday, &t.tv, NULL)) in main() 50 (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec); in main() 52 if (syscall(__NR_gettimeofday, &t.tv, &t.tz)) in main() 56 (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, in main() 59 t.tv.tv_sec = -1; in main() 60 t.tv.tv_usec = 1000000000; in main() 61 if (!settimeofday(&t.tv, &t.tz)) in main() 66 (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, in main()
|
D | xselect.c | 52 struct timeval tv; in main() member 55 .tv = { .tv_sec = 0xc0de1, .tv_usec = 0xc0de2 }, in main() 81 if (syscall(TEST_SYSCALL_NR, fds[1] + 1, NULL, set, NULL, &tm.tv) != 3) in main() 86 (long long) tm_in.tv.tv_sec, (long long) tm_in.tv.tv_usec, in main() 88 (long long) tm.tv.tv_sec, (long long) tm.tv.tv_usec); in main() 106 tm.tv.tv_sec = 0; in main() 107 tm.tv.tv_usec = 123; in main() 108 if (syscall(TEST_SYSCALL_NR, FD_SETSIZE + 1, set, set + 1, NULL, &tm.tv)) in main()
|
D | utimensat.c | 51 struct timeval tv; in main() local 54 if (gettimeofday(&tv, NULL)) in main() 57 ts[0].tv_sec = tv.tv_sec; in main() 58 ts[0].tv_nsec = tv.tv_usec; in main() 59 ts[1].tv_sec = tv.tv_sec - 1; in main() 60 ts[1].tv_nsec = tv.tv_usec + 1; in main()
|
/external/tremolo/Tremolo/ |
D | misc.c | 91 struct timeval tv; in _insert() local 95 gettimeofday(&tv,&tz); in _insert() 115 if(start_time==-1)start_time=(tv.tv_sec*1000)+(tv.tv_usec/1000); in _insert() 121 fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), in _insert() 124 -start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), in _insert() 129 fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), in _insert() 131 fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), in _insert() 148 struct timeval tv; in _ripremove() local 155 gettimeofday(&tv,&tz); in _ripremove() 156 fprintf(out,"%ld, %ld\n",-start_time+(tv.tv_sec*1000)+(tv.tv_usec/1000), in _ripremove() [all …]
|
/external/dhcpcd-6.8.2/ |
D | common.h | 88 #define timespec_to_double(tv) \ argument 89 ((double)(tv)->tv_sec + (double)((tv)->tv_nsec) / 1000000000.0) 90 #define timespecnorm(tv) do { \ argument 91 while ((tv)->tv_nsec >= NSEC_PER_SEC) { \ 92 (tv)->tv_sec++; \ 93 (tv)->tv_nsec -= NSEC_PER_SEC; \ 96 #define ts_to_ms(ms, tv) do { \ argument 97 ms = (tv)->tv_sec * MSEC_PER_SEC; \ 98 ms += (tv)->tv_nsec / MSEC_PER_NSEC; \ 100 #define ms_to_ts(tv, ms) do { \ argument [all …]
|
/external/libmicrohttpd/src/examples/ |
D | benchmark_https.c | 69 struct timeval *tv = *con_cls; in completed_callback() local 73 if (NULL == tv) in completed_callback() 78 if (tve.tv_usec >= tv->tv_usec) in completed_callback() 79 delta += (tve.tv_sec - tv->tv_sec) * 1000000LL in completed_callback() 80 + (tve.tv_usec - tv->tv_usec); in completed_callback() 82 delta += (tve.tv_sec - tv->tv_sec) * 1000000LL in completed_callback() 83 - tv->tv_usec + tve.tv_usec; in completed_callback() 88 free (tv); in completed_callback() 96 struct timeval *tv = malloc (sizeof (struct timeval)); in uri_logger_cb() local 98 if (NULL != tv) in uri_logger_cb() [all …]
|
D | benchmark.c | 69 struct timeval *tv = *con_cls; in completed_callback() local 73 if (NULL == tv) in completed_callback() 78 if (tve.tv_usec >= tv->tv_usec) in completed_callback() 79 delta += (tve.tv_sec - tv->tv_sec) * 1000000LL in completed_callback() 80 + (tve.tv_usec - tv->tv_usec); in completed_callback() 82 delta += (tve.tv_sec - tv->tv_sec) * 1000000LL in completed_callback() 83 - tv->tv_usec + tve.tv_usec; in completed_callback() 88 free (tv); in completed_callback() 96 struct timeval *tv = malloc (sizeof (struct timeval)); in uri_logger_cb() local 98 if (NULL != tv) in uri_logger_cb() [all …]
|
/external/tlsdate/src/ |
D | tlsdate-setter.c | 106 struct timeval tv = { 0, 0 }; in time_setter_coprocess() local 116 ssize_t bytes = read (time_fd, &tv.tv_sec, sizeof (tv.tv_sec)); in time_setter_coprocess() 131 if (bytes != sizeof (tv.tv_sec)) in time_setter_coprocess() 133 if (tv.tv_sec < 0) in time_setter_coprocess() 136 tv.tv_sec = -tv.tv_sec; in time_setter_coprocess() 139 if (tv.tv_sec == 0) in time_setter_coprocess() 144 if (is_sane_time (tv.tv_sec)) in time_setter_coprocess() 153 if (settimeofday (&tv, NULL) < 0) in time_setter_coprocess() 159 platform->rtc_write(&state->hwclock, &tv)) in time_setter_coprocess() 165 save_timestamp_to_fd (save_fd, tv.tv_sec)) in time_setter_coprocess()
|
/external/avahi/avahi-core/ |
D | conformance-test.c | 55 struct timeval tv; in dump_timeout_callback() local 59 avahi_elapse_time(&tv, 5000, 0); in dump_timeout_callback() 60 poll_api->timeout_update(timeout, &tv); in dump_timeout_callback() 86 struct timeval tv; in rename_timeout_callback() local 93 avahi_elapse_time(&tv, 5000, 0); in rename_timeout_callback() 94 poll_api->timeout_update(timeout, &tv); in rename_timeout_callback() 125 struct timeval tv; in main() local 139 avahi_elapse_time(&tv, 5000, 0); in main() 140 poll_api->timeout_new(poll_api, &tv, dump_timeout_callback, avahi); in main() 142 avahi_elapse_time(&tv, 5000, 0); in main() [all …]
|
D | querier.c | 66 struct timeval tv; in querier_elapse_callback() local 94 avahi_elapse_time(&tv, q->sec_delay*1000, 0); in querier_elapse_callback() 95 avahi_time_event_update(q->time_event, &tv); in querier_elapse_callback() 100 struct timeval tv; in avahi_querier_add() local 134 …hi_time_event_new(i->monitor->server->time_event_queue, avahi_elapse_time(&tv, q->sec_delay*1000, … in avahi_querier_add() 202 struct timeval tv; in add_querier_callback() local 203 avahi_querier_add(i, cbdata->key, &tv); in add_querier_callback() 205 if (cbdata->ret_ctime && avahi_timeval_compare(&tv, cbdata->ret_ctime) > 0) in add_querier_callback() 206 *cbdata->ret_ctime = tv; in add_querier_callback() 251 struct timeval tv; in avahi_querier_shall_refresh_cache() local [all …]
|
D | timeeventq-test.c | 39 struct timeval tv = {0, 0}; in callback() local 42 avahi_elapse_time(&tv, 1000, 100); in callback() 43 avahi_time_event_update(e, &tv); in callback() 47 struct timeval tv; in main() local 54 avahi_time_event_new(q, avahi_elapse_time(&tv, 5000, 100), callback, INT_TO_POINTER(1)); in main() 55 avahi_time_event_new(q, avahi_elapse_time(&tv, 5000, 100), callback, INT_TO_POINTER(2)); in main()
|
/external/toybox/toys/pending/ |
D | brctl.c | 175 static void strtotimeval(struct timeval *tv, char *time) in strtotimeval() argument 180 tv->tv_sec = secs; in strtotimeval() 181 tv->tv_usec = 1000000 * (secs - tv->tv_sec); in strtotimeval() 184 static unsigned long tv_to_jify(struct timeval *tv) in tv_to_jify() argument 188 jify = 1000000ULL * tv->tv_sec + tv->tv_usec; in tv_to_jify() 204 struct timeval tv; in br_set_ageing_time() local 206 strtotimeval(&tv, argv[1]); in br_set_ageing_time() 207 set_time(argv[0], BRCTL_SET_AGEING_TIME, tv_to_jify(&tv)); in br_set_ageing_time() 212 struct timeval tv; in br_set_fwd_delay() local 214 strtotimeval(&tv, argv[1]); in br_set_fwd_delay() [all …]
|
/external/webrtc/webrtc/system_wrappers/source/ |
D | clock.cc | 51 timeval tv = CurrentTimeVal(); in CurrentNtp() local 53 Adjust(tv, &seconds, µseconds_in_seconds); in CurrentNtp() 60 timeval tv = CurrentTimeVal(); in CurrentNtpInMilliseconds() local 63 Adjust(tv, &seconds, µseconds_in_seconds); in CurrentNtpInMilliseconds() 71 static void Adjust(const timeval& tv, uint32_t* adjusted_s, in Adjust() argument 73 *adjusted_s = tv.tv_sec + kNtpJan1970; in Adjust() 74 *adjusted_us_in_s = tv.tv_usec / 1e6; in Adjust() 110 struct timeval tv; in CurrentTimeVal() local 122 tv.tv_sec = (uint32_t)(Time / (uint64_t)10000000); in CurrentTimeVal() 123 tv.tv_usec = (uint32_t)((Time % (uint64_t)10000000) / 10); in CurrentTimeVal() [all …]
|
/external/e2fsprogs/lib/uuid/ |
D | uuid_time.c | 58 struct timeval tv; in uuid_time() local 69 tv.tv_sec = clock_reg / 10000000; in uuid_time() 70 tv.tv_usec = (clock_reg % 10000000) / 10; in uuid_time() 73 *ret_tv = tv; in uuid_time() 75 return tv.tv_sec; in uuid_time() 124 struct timeval tv; in main() local 137 time_reg = uuid_time(buf, &tv); in main() 166 printf("UUID time is: (%ld, %ld): %s\n", tv.tv_sec, (long)tv.tv_usec, in main()
|
D | gen_uuid.c | 114 static void gettimeofday (struct timeval *tv, void *dummy) in gettimeofday() argument 127 tv->tv_sec = n / 1000000; in gettimeofday() 128 tv->tv_usec = n % 1000000; in gettimeofday() 139 struct timeval tv; in get_random_fd() local 144 gettimeofday(&tv, 0); in get_random_fd() 155 srand((getpid() << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec); in get_random_fd() 157 jrand_seed[0] = getpid() ^ (tv.tv_sec & 0xFFFF); in get_random_fd() 158 jrand_seed[1] = getppid() ^ (tv.tv_usec & 0xFFFF); in get_random_fd() 159 jrand_seed[2] = (tv.tv_sec ^ tv.tv_usec) >> 16; in get_random_fd() 163 gettimeofday(&tv, 0); in get_random_fd() [all …]
|
/external/wpa_supplicant_8/src/crypto/ |
D | crypto_module_tests.c | 213 static int test_omac1_vector(const struct omac1_test_vector *tv, in test_omac1_vector() argument 225 if (omac1_aes_128(tv->k, tv->msg, tv->msg_len, result) || in test_omac1_vector() 226 os_memcmp(result, tv->tag, 16) != 0) { in test_omac1_vector() 231 if (tv->msg_len > 1) { in test_omac1_vector() 233 addr[0] = tv->msg; in test_omac1_vector() 235 addr[1] = tv->msg + 1; in test_omac1_vector() 236 len[1] = tv->msg_len - 1; in test_omac1_vector() 238 if (omac1_aes_128_vector(tv->k, 2, addr, len, result) || in test_omac1_vector() 239 os_memcmp(result, tv->tag, 16) != 0) { in test_omac1_vector() 246 addr[0] = tv->msg; in test_omac1_vector() [all …]
|
/external/fio/ |
D | time.c | 27 struct timeval tv; in usec_sleep() local 47 fio_gettime(&tv, NULL); in usec_sleep() 52 ts = utime_since_now(&tv); in usec_sleep() 85 struct timeval tv; in ramp_time_over() local 90 fio_gettime(&tv, NULL); in ramp_time_over() 91 if (utime_since(&td->epoch, &tv) >= td->o.ramp_time) { in ramp_time_over() 111 struct timeval tv; in fio_time_init() local 115 fio_gettime(&tv, NULL); in fio_time_init() 120 elapsed = utime_since_now(&tv); in fio_time_init()
|
/external/avahi/avahi-qt/ |
D | qt-watch.cpp | 62 AvahiTimeout(const struct timeval* tv, AvahiTimeoutCallback callback, void* userdata); 64 void update(const struct timeval* tv); 113 AvahiTimeout::AvahiTimeout(const struct timeval* tv, AvahiTimeoutCallback callback, void *userdata)… in AvahiTimeout() argument 120 update(tv); in AvahiTimeout() 123 void AvahiTimeout::update(const struct timeval *tv) in update() argument 126 if (tv) { in update() 127 AvahiUsec u = avahi_age(tv)/1000; in update() 162 static AvahiTimeout* q_timeout_new(const AvahiPoll *api, const struct timeval *tv, AvahiTimeoutCall… in q_timeout_new() argument 165 return new AvahiTimeout(tv, callback, userdata); in q_timeout_new() 168 static void q_timeout_update(AvahiTimeout *t, const struct timeval *tv) in q_timeout_update() argument [all …]
|
/external/libevent/include/event2/ |
D | event_compat.h | 188 #define timeout_add(ev, tv) event_add((ev), (tv)) argument 191 #define timeout_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv)) argument 202 #define signal_add(ev, tv) event_add((ev), (tv)) argument 206 #define signal_pending(ev, tv) event_pending((ev), EV_SIGNAL, (tv)) argument
|
D | event.h | 757 #define evtimer_add(ev, tv) event_add((ev), (tv)) argument 759 #define evtimer_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv)) argument 769 #define evsignal_add(ev, tv) event_add((ev), (tv)) argument 775 #define evsignal_pending(ev, tv) event_pending((ev), EV_SIGNAL, (tv)) argument 982 int event_pending(const struct event *ev, short events, struct timeval *tv); 1198 struct timeval *tv);
|
/external/v8/src/base/platform/ |
D | time.cc | 256 struct timeval tv; in Now() local 257 int result = gettimeofday(&tv, NULL); in Now() 260 return FromTimeval(tv); in Now() 302 Time Time::FromTimeval(struct timeval tv) { in FromTimeval() argument 303 DCHECK(tv.tv_usec >= 0); in FromTimeval() 304 DCHECK(tv.tv_usec < static_cast<suseconds_t>(kMicrosecondsPerSecond)); in FromTimeval() 305 if (tv.tv_usec == 0 && tv.tv_sec == 0) { in FromTimeval() 308 if (tv.tv_usec == static_cast<suseconds_t>(kMicrosecondsPerSecond - 1) && in FromTimeval() 309 tv.tv_sec == std::numeric_limits<time_t>::max()) { in FromTimeval() 312 return Time(tv.tv_sec * kMicrosecondsPerSecond + tv.tv_usec); in FromTimeval() [all …]
|
/external/google-benchmark/src/ |
D | cycleclock.h | 126 struct timeval tv; in Now() 127 gettimeofday(&tv, nullptr); in Now() 128 return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec; in Now() 132 struct timeval tv; in Now() 133 gettimeofday(&tv, nullptr); in Now() 134 return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec; in Now()
|
/external/iputils/ |
D | ping_common.c | 455 struct timeval tv; in print_timestamp() local 456 gettimeofday(&tv, NULL); in print_timestamp() 458 (unsigned long)tv.tv_sec, (unsigned long)tv.tv_usec); in print_timestamp() 486 struct timeval tv; in pinger() local 488 gettimeofday(&tv, NULL); in pinger() 489 ntokens = (tv.tv_sec - cur_time.tv_sec)*1000 + in pinger() 490 (tv.tv_usec-cur_time.tv_usec)/1000; in pinger() 503 cur_time = tv; in pinger() 632 struct timeval tv; in setup() local 668 tv.tv_sec = 1; in setup() [all …]
|