Home
last modified time | relevance | path

Searched refs:tv (Results 1 – 24 of 24) sorted by relevance

/system/connectivity/shill/net/
Dshill_time.cc68 int Time::GetTimeMonotonic(struct timeval* tv) { in GetTimeMonotonic() argument
74 tv->tv_sec = ts.tv_sec; in GetTimeMonotonic()
75 tv->tv_usec = ts.tv_nsec / 1000; in GetTimeMonotonic()
79 int Time::GetTimeBoottime(struct timeval* tv) { in GetTimeBoottime() argument
85 tv->tv_sec = ts.tv_sec; in GetTimeBoottime()
86 tv->tv_usec = ts.tv_nsec / 1000; in GetTimeBoottime()
90 int Time::GetTimeOfDay(struct timeval* tv, struct timezone* tz) { in GetTimeOfDay() argument
91 return gettimeofday(tv, tz); in GetTimeOfDay()
Dmock_time.h34 MOCK_METHOD1(GetTimeMonotonic, int(struct timeval* tv));
35 MOCK_METHOD1(GetTimeBoottime, int(struct timeval* tv));
36 MOCK_METHOD2(GetTimeOfDay, int(struct timeval* tv, struct timezone* tz));
Dshill_time.h65 virtual int GetTimeMonotonic(struct timeval* tv);
68 virtual int GetTimeBoottime(struct timeval* tv);
71 virtual int GetTimeOfDay(struct timeval* tv, struct timezone* tz);
/system/bt/btif/src/
Dbtif_debug.c37 struct timeval tv; in btif_debug_ts() local
38 gettimeofday(&tv, NULL); in btif_debug_ts()
39 return (tv.tv_sec * 1000000LL) + tv.tv_usec; in btif_debug_ts()
/system/core/libcutils/
Dsockets_unix.cpp56 timeval tv; in socket_set_receive_timeout() local
57 tv.tv_sec = timeout_ms / 1000; in socket_set_receive_timeout()
58 tv.tv_usec = (timeout_ms % 1000) * 1000; in socket_set_receive_timeout()
59 return setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); in socket_set_receive_timeout()
/system/core/fastboot/
Dutil.cpp40 struct timeval tv; in now() local
41 gettimeofday(&tv, NULL); in now()
42 return (double)tv.tv_sec + (double)tv.tv_usec / 1000000; in now()
Dusbtest.cpp43 struct timeval tv; in NOW() local
44 gettimeofday(&tv, 0); in NOW()
46 return (((long long) tv.tv_sec) * ((long long) 1000000)) + in NOW()
47 (((long long) tv.tv_usec)); in NOW()
/system/core/toolbox/upstream-netbsd/bin/dd/
Dmisc.c60 #define tv2mS(tv) ((tv).tv_sec * 1000LL + ((tv).tv_usec + 500) / 1000) argument
99 struct timeval tv; in posix_summary() local
104 (void)gettimeofday(&tv, NULL); in posix_summary()
105 mS = tv2mS(tv) - tv2mS(st.start); in posix_summary()
199 struct timeval tv; in dd_write_msg() local
201 (void)gettimeofday(&tv, NULL); in dd_write_msg()
202 mS = tv2mS(tv) - tv2mS(st.start); in dd_write_msg()
/system/bt/hci/src/
Dbtsnoop.c142 struct timeval tv; in btsnoop_timestamp() local
143 gettimeofday(&tv, NULL); in btsnoop_timestamp()
146 uint64_t timestamp = tv.tv_sec * 1000 * 1000LL; in btsnoop_timestamp()
147 timestamp += tv.tv_usec; in btsnoop_timestamp()
/system/connectivity/shill/
Dshill_ares.cc70 struct timeval* tv) { in Timeout() argument
71 return ares_timeout(channel, maxtv, tv); in Timeout()
Dmock_ares.h51 struct timeval* tv));
Dshill_ares.h64 struct timeval* tv);
Dportal_detector_unittest.cc153 struct timeval tv = { milliseconds / 1000, (milliseconds % 1000) * 1000 }; in AdvanceTime() local
154 timeradd(&current_time_, &tv, &current_time_); in AdvanceTime()
164 int GetTimeMonotonic(struct timeval* tv) { in GetTimeMonotonic() argument
165 *tv = current_time_; in GetTimeMonotonic()
Ddns_client.cc378 struct timeval* tv = ares_->Timeout(resolver_state_->channel, in RefreshHandles() local
383 tv->tv_sec * 1000 + tv->tv_usec / 1000); in RefreshHandles()
Dconnectivity_trial_unittest.cc183 struct timeval tv = { milliseconds / 1000, (milliseconds % 1000) * 1000 }; in AdvanceTime() local
184 timeradd(&current_time_, &tv, &current_time_); in AdvanceTime()
206 int GetTimeMonotonic(struct timeval* tv) { in GetTimeMonotonic() argument
207 *tv = current_time_; in GetTimeMonotonic()
/system/core/debuggerd/
Ddebuggerd.cpp283 struct timeval tv; in activity_manager_connect() local
284 memset(&tv, 0, sizeof(tv)); in activity_manager_connect()
285 tv.tv_sec = 1; // tight leash in activity_manager_connect()
286 if (setsockopt(amfd.get(), SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) == -1) { in activity_manager_connect()
292 tv.tv_sec = 3; // 3 seconds on handshake read in activity_manager_connect()
293 if (setsockopt(amfd.get(), SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) == -1) { in activity_manager_connect()
/system/bt/osi/test/
Dfixed_queue_test.cpp27 struct timeval tv; in is_fd_readable() local
30 tv.tv_sec = 0; in is_fd_readable()
31 tv.tv_usec = 0; in is_fd_readable()
34 int result = select(FD_SETSIZE, &rfds, NULL, NULL, &tv); in is_fd_readable()
/system/core/liblog/
Dlogger_write.c330 struct timeval tv; in __write_to_log_daemon() local
331 gettimeofday(&tv, NULL); in __write_to_log_daemon()
332 ts.tv_sec = tv.tv_sec; in __write_to_log_daemon()
333 ts.tv_nsec = tv.tv_usec * 1000; in __write_to_log_daemon()
/system/core/trusty/libtrusty/tipc-test/
Dtipc_test.c455 struct timeval tv; in _wait_for_msg() local
464 tv.tv_sec = timeout; in _wait_for_msg()
465 tv.tv_usec = 0; in _wait_for_msg()
468 rc = select(fd+1, &rfds, NULL, NULL, &tv); in _wait_for_msg()
/system/bt/audio_a2dp_hw/
Daudio_a2dp_hw.c238 struct timeval tv; in skt_connect() local
239 tv.tv_sec = SOCK_SEND_TIMEOUT_MS / 1000; in skt_connect()
240 tv.tv_usec = (SOCK_SEND_TIMEOUT_MS % 1000) * 1000; in skt_connect()
242 ret = setsockopt(skt_fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)); in skt_connect()
246 tv.tv_sec = SOCK_RECV_TIMEOUT_MS / 1000; in skt_connect()
247 tv.tv_usec = (SOCK_RECV_TIMEOUT_MS % 1000) * 1000; in skt_connect()
249 ret = setsockopt(skt_fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); in skt_connect()
/system/connectivity/shill/test-rpc-proxy/
Dproxy_rpc_server.cc462 struct timeval tv; in SyncTimeTo() local
463 tv.tv_sec = seconds; in SyncTimeTo()
464 tv.tv_usec = microseconds; in SyncTimeTo()
465 return settimeofday(&tv, nullptr); in SyncTimeTo()
/system/core/adb/
Dfile_sync_client.cpp427 struct timeval tv; in CurrentTimeMs() local
428 gettimeofday(&tv, 0); // (Not clock_gettime because of Mac/Windows.) in CurrentTimeMs()
429 return static_cast<uint64_t>(tv.tv_sec) * 1000 + tv.tv_usec / 1000; in CurrentTimeMs()
/system/core/toolbox/
Dnewfs_msdos.c251 struct timeval tv; in newfs_msdos_main() local
638 gettimeofday(&tv, NULL); in newfs_msdos_main()
639 now = tv.tv_sec; in newfs_msdos_main()
692 (u_int)(tv.tv_usec / 10))) << 16 | in newfs_msdos_main()
/system/extras/tests/framebuffer/
Dfb_test.c47 struct timespec tv, tv2; variable