Home
last modified time | relevance | path

Searched refs:ts (Results 1 – 25 of 50) sorted by relevance

12

/system/bt/btif/src/
Dbtif_sock_thread.cc95 static thread_slot_t ts[MAX_THREAD]; variable
136 APPL_TRACE_DEBUG("ts[%d].used:%d", i, ts[i].used); in alloc_thread_slot()
137 if (!ts[i].used) { in alloc_thread_slot()
138 ts[i].used = 1; in alloc_thread_slot()
148 ts[h].used = 0; in free_thread_slot()
159 ts[h].cmd_fdr = ts[h].cmd_fdw = -1; in btsock_thread_init()
160 ts[h].used = 0; in btsock_thread_init()
161 ts[h].thread_id = -1; in btsock_thread_init()
162 ts[h].poll_count = 0; in btsock_thread_init()
163 ts[h].callback = NULL; in btsock_thread_init()
[all …]
Dbtif_debug_conn.cc30 uint64_t ts; member
39 static char* format_ts(const uint64_t ts, char* buffer, int len) { in format_ts() argument
40 const uint64_t ms = ts / 1000; in format_ts()
72 evt->ts = bluetooth::common::time_gettimeofday_us(); in btif_debug_conn_state()
85 if (connection_events[dump_event].ts == 0) dprintf(fd, " None\n"); in btif_debug_conn_dump()
87 while (connection_events[dump_event].ts) { in btif_debug_conn_dump()
89 dprintf(fd, " %s %s %s", format_ts(evt->ts, ts_buffer, sizeof(ts_buffer)), in btif_debug_conn_dump()
/system/core/liblog/tests/
Dlog_time_test.cpp24 struct timespec ts; in TEST() local
25 clock_gettime(CLOCK_MONOTONIC, &ts); in TEST()
26 log_time tl(ts); in TEST()
28 EXPECT_EQ(tl, ts); in TEST()
29 EXPECT_GE(tl, ts); in TEST()
30 EXPECT_LE(tl, ts); in TEST()
Dliblog_benchmark.cpp201 struct timespec ts; in BM_pmsg_short() local
202 clock_gettime(android_log_clockid(), &ts); in BM_pmsg_short()
213 header.realtime.tv_sec = ts.tv_sec; in BM_pmsg_short()
214 header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_short()
277 struct timespec ts; in BM_pmsg_short_aligned() local
278 clock_gettime(android_log_clockid(), &ts); in BM_pmsg_short_aligned()
300 buffer->header.realtime.tv_sec = ts.tv_sec; in BM_pmsg_short_aligned()
301 buffer->header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_short_aligned()
352 struct timespec ts; in BM_pmsg_short_unaligned1() local
353 clock_gettime(android_log_clockid(), &ts); in BM_pmsg_short_unaligned1()
[all …]
Dlog_read_test.cpp42 struct timespec ts; in TEST() local
43 clock_gettime(CLOCK_MONOTONIC, &ts); in TEST()
45 ts.tv_sec, ts.tv_nsec); in TEST()
/system/core/libutils/include/utils/
DCondition.h121 struct timespec ts; in waitRelative() local
123 clock_gettime(CLOCK_MONOTONIC, &ts); in waitRelative()
128 ts.tv_sec = t.tv_sec; in waitRelative()
129 ts.tv_nsec = t.tv_usec*1000; in waitRelative()
135 ts.tv_nsec += static_cast<long>(reltime%1000000000); in waitRelative()
136 if (reltime_sec < INT64_MAX && ts.tv_nsec >= 1000000000) { in waitRelative()
137 ts.tv_nsec -= 1000000000; in waitRelative()
141 int64_t time_sec = ts.tv_sec; in waitRelative()
148 ts.tv_sec = (time_sec > LONG_MAX) ? LONG_MAX : static_cast<long>(time_sec); in waitRelative()
150 return -pthread_cond_timedwait(&mCond, &mutex.mMutex, &ts); in waitRelative()
/system/media/audio_utils/include/audio_utils/
Dclock.h93 audio_utils_time_string_t ts; in audio_utils_time_string_from_ns() local
95 audio_utils_ns_to_string(ns, ts.time, sizeof(ts.time)); in audio_utils_time_string_from_ns()
96 return ts; in audio_utils_time_string_from_ns()
104 static inline int64_t audio_utils_ns_from_timespec(const struct timespec *ts) in audio_utils_ns_from_timespec() argument
106 return ts->tv_sec * 1000000000LL + ts->tv_nsec; in audio_utils_ns_from_timespec()
/system/libhwbinder/
DBufferedTextOutput.cpp101 ThreadState* ts = (ThreadState*) thread_store_get( &tls ); in getThreadState() local
102 if (ts) return ts; in getThreadState()
103 ts = new ThreadState; in getThreadState()
104 thread_store_set( &tls, ts, threadDestructor ); in getThreadState()
105 return ts; in getThreadState()
267 ThreadState* ts = getThreadState(); in getBuffer() local
268 if (ts) { in getBuffer()
269 while (ts->states.size() <= (size_t)mIndex) ts->states.add(nullptr); in getBuffer()
270 BufferState* bs = ts->states[mIndex].get(); in getBuffer()
273 ts->states.editItemAt(mIndex) = new BufferState(mIndex); in getBuffer()
[all …]
/system/core/libutils/
DSystemClock.cpp60 struct timespec ts; in elapsedRealtimeNano() local
61 int err = clock_gettime(CLOCK_BOOTTIME, &ts); in elapsedRealtimeNano()
68 return seconds_to_nanoseconds(ts.tv_sec) + ts.tv_nsec; in elapsedRealtimeNano()
DSystemClock_test.cpp47 timespec ts; in TEST() local
48 ts.tv_sec = 0; in TEST()
49 ts.tv_nsec = SLEEP_MS * MS_IN_NS; in TEST()
50 auto nanosleepErr = TEMP_FAILURE_RETRY(nanosleep(&ts, nullptr)); in TEST()
/system/core/base/
Dchrono_utils.cpp26 timespec ts; in now() local
27 clock_gettime(CLOCK_BOOTTIME, &ts); in now()
28 return boot_clock::time_point(std::chrono::seconds(ts.tv_sec) + in now()
29 std::chrono::nanoseconds(ts.tv_nsec)); in now()
Dproperties.cpp125 static void DurationToTimeSpec(timespec& ts, const std::chrono::milliseconds d) { in DurationToTimeSpec() argument
128 ts.tv_sec = std::min<std::chrono::seconds::rep>(s.count(), std::numeric_limits<time_t>::max()); in DurationToTimeSpec()
129 ts.tv_nsec = ns.count(); in DurationToTimeSpec()
135 static void UpdateTimeSpec(timespec& ts, std::chrono::milliseconds relative_timeout, in UpdateTimeSpec() argument
140 ts = { 0, 0 }; in UpdateTimeSpec()
143 DurationToTimeSpec(ts, remaining_timeout); in UpdateTimeSpec()
160 timespec ts; in WaitForPropertyCreation() local
161 UpdateTimeSpec(ts, relative_timeout, start_time); in WaitForPropertyCreation()
162 if (!__system_property_wait(nullptr, global_serial, &global_serial, &ts)) return nullptr; in WaitForPropertyCreation()
177 timespec ts; in WaitForProperty() local
[all …]
/system/extras/simpleperf/runtest/
Drun_and_sleep.cpp9 timespec ts; in GetSystemClock() local
11 clock_gettime(CLOCK_MONOTONIC, &ts); in GetSystemClock()
12 return ts.tv_sec * 1000000000ULL + ts.tv_nsec; in GetSystemClock()
/system/core/liblog/
Dpmsg_writer.cpp41 static int pmsgWrite(log_id_t logId, struct timespec* ts, struct iovec* vec, size_t nr);
98 static int pmsgWrite(log_id_t logId, struct timespec* ts, struct iovec* vec, size_t nr) { in pmsgWrite() argument
147 header.realtime.tv_sec = ts->tv_sec; in pmsgWrite()
148 header.realtime.tv_nsec = ts->tv_nsec; in pmsgWrite()
209 struct timespec ts; in __android_log_pmsg_file_write() local
220 clock_gettime(android_log_clockid(), &ts); in __android_log_pmsg_file_write()
246 for (ts.tv_nsec = 0, length = len; length; ts.tv_nsec += ANDROID_LOG_PMSG_FILE_SEQUENCE) { in __android_log_pmsg_file_write()
250 if ((ts.tv_nsec / ANDROID_LOG_PMSG_FILE_SEQUENCE) >= ANDROID_LOG_PMSG_FILE_MAX_SEQUENCE) { in __android_log_pmsg_file_write()
280 ret = pmsgWrite(logId, &ts, vec, sizeof(vec) / sizeof(vec[0])); in __android_log_pmsg_file_write()
/system/core/libcutils/
Dtrace-container.cpp118 struct timespec ts; in gettime() local
119 clock_gettime(clk_id, &ts); in gettime()
120 return ts.tv_sec * 1000000 + ts.tv_nsec / 1000; in gettime()
129 uint64_t ts = gettime(CLOCK_MONOTONIC); \
134 pid, tid, ts, tts, name, value); \
143 pid, tid, ts, tts, name_len, name, value); \
Dsocket_network_client_unix.cpp82 struct timeval ts; in socket_network_client_timeout() local
83 ts.tv_sec = timeout; in socket_network_client_timeout()
84 ts.tv_usec = 0; in socket_network_client_timeout()
85 if ((rc = select(s + 1, &r_set, &w_set, NULL, (timeout != 0) ? &ts : NULL)) == -1) { in socket_network_client_timeout()
/system/extras/simpleperf/demo/CppApi/app/src/main/cpp/
Dnative-lib.cpp69 timespec ts; in BusyThreadFunc() local
70 ts.tv_sec = 0; in BusyThreadFunc()
71 ts.tv_nsec = 1000000; in BusyThreadFunc()
72 nanosleep(&ts, nullptr); in BusyThreadFunc()
/system/core/storaged/
Dstoraged_diskstats.cpp69 bool get_time(struct timespec* ts) { in get_time() argument
72 int ret = clock_gettime(CLOCK_MONOTONIC, ts); in get_time()
80 void init_disk_stats_other(const struct timespec& ts, struct disk_stats* stats) { in init_disk_stats_other() argument
82 … stats->end_time = (uint64_t)ts.tv_sec * SEC_TO_MSEC + ts.tv_nsec / (MSEC_TO_USEC * USEC_TO_NSEC); in init_disk_stats_other()
89 struct timespec ts; in parse_disk_stats() local
90 if (!get_time(&ts)) { in parse_disk_stats()
106 init_disk_stats_other(ts, stats); in parse_disk_stats()
125 struct timespec ts; in get_disk_stats_from_health_hal() local
126 if (!get_time(&ts)) { in get_disk_stats_from_health_hal()
155 init_disk_stats_other(ts, stats); in get_disk_stats_from_health_hal()
/system/core/libbacktrace/
DThreadEntry.cpp100 timespec ts; in Wait() local
101 clock_gettime(CLOCK_MONOTONIC, &ts); in Wait()
102 ts.tv_sec += 5; in Wait()
107 int ret = pthread_cond_timedwait(&wait_cond_, &wait_mutex_, &ts); in Wait()
/system/extras/simpleperf/demo/SimpleperfExampleWithNative/app/src/main/cpp/
Dnative-lib.cpp65 timespec ts; in GetSystemClock() local
66 clock_gettime(CLOCK_MONOTONIC, &ts); in GetSystemClock()
67 return ts.tv_sec * 1000000000ULL + ts.tv_nsec; in GetSystemClock()
/system/connectivity/wificond/tests/
Dshell_utils.cpp51 struct timespec ts; in GetCurrentTimeMs() local
52 clock_gettime(CLOCK_MONOTONIC, &ts); in GetCurrentTimeMs()
53 return (int64_t{ts.tv_sec} * kMillisecondsPerSecond) + in GetCurrentTimeMs()
54 (ts.tv_nsec / kNanosecondsPerMillisecond); in GetCurrentTimeMs()
/system/netd/server/
DWakeupControllerTest.cpp108 timespec ts; in TEST_F() member
122 msg.tsAttr.nla_len = sizeof(msg.tsAttr) + sizeof(msg.ts); in TEST_F()
123 msg.ts.tv_sec = htonl(kTsNs / kNsPerS); in TEST_F()
124 msg.ts.tv_nsec = htonl(kTsNs % kNsPerS); in TEST_F()
158 timespec ts; in TEST_F() member
183 msg.tsAttr.nla_len = sizeof(msg.tsAttr) + sizeof(msg.ts); in TEST_F()
184 msg.ts.tv_sec = htonl(kTsNs / kNsPerS); in TEST_F()
185 msg.ts.tv_nsec = htonl(kTsNs % kNsPerS); in TEST_F()
229 timespec ts; in TEST_F() member
249 msg.ts.tv_sec = htonl(kTsNs / kNsPerS); in TEST_F()
[all …]
/system/extras/simpleperf/
Denvironment.h89 timespec ts; in GetSystemClock() local
91 clock_gettime(CLOCK_MONOTONIC, &ts); in GetSystemClock()
92 return ts.tv_sec * 1000000000ULL + ts.tv_nsec; in GetSystemClock()
/system/connectivity/wifilogd/
Draw_os.cpp34 int RawOs::ClockGettime(clockid_t clock_id, struct timespec* ts) const { in ClockGettime()
35 return clock_gettime(clock_id, ts); in ClockGettime()
/system/core/libstats/
Dstats_event_list.c149 struct timespec ts; in __write_to_stats_daemon() local
161 clock_gettime(CLOCK_REALTIME, &ts); in __write_to_stats_daemon()
165 ts.tv_sec = tv.tv_sec; in __write_to_stats_daemon()
166 ts.tv_nsec = tv.tv_usec * 1000; in __write_to_stats_daemon()
169 int ret = (int)(*statsdLoggerWrite.write)(&ts, vec, nr); in __write_to_stats_daemon()

12