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

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

Completed in 464 milliseconds