Home
last modified time | relevance | path

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

12

/system/bt/btif/src/
Dbtif_sock_thread.cc96 static thread_slot_t ts[MAX_THREAD]; variable
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()
158 ts[h].cmd_fdr = ts[h].cmd_fdw = -1; in btsock_thread_init()
159 ts[h].used = 0; in btsock_thread_init()
160 ts[h].thread_id = std::nullopt; in btsock_thread_init()
161 ts[h].poll_count = 0; in btsock_thread_init()
162 ts[h].callback = NULL; in btsock_thread_init()
163 ts[h].cmd_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/logging/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.cpp186 struct timespec ts; in BM_pmsg_short() local
187 clock_gettime(CLOCK_REALTIME, &ts); in BM_pmsg_short()
198 header.realtime.tv_sec = ts.tv_sec; in BM_pmsg_short()
199 header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_short()
262 struct timespec ts; in BM_pmsg_short_aligned() local
263 clock_gettime(CLOCK_REALTIME, &ts); in BM_pmsg_short_aligned()
285 buffer->header.realtime.tv_sec = ts.tv_sec; in BM_pmsg_short_aligned()
286 buffer->header.realtime.tv_nsec = ts.tv_nsec; in BM_pmsg_short_aligned()
337 struct timespec ts; in BM_pmsg_short_unaligned1() local
338 clock_gettime(CLOCK_REALTIME, &ts); in BM_pmsg_short_unaligned1()
[all …]
/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/core/libutils/
DSystemClock.cpp67 struct timespec ts; in elapsedRealtimeNano() local
68 int err = clock_gettime(CLOCK_BOOTTIME, &ts); in elapsedRealtimeNano()
75 return seconds_to_nanoseconds(ts.tv_sec) + ts.tv_nsec; in elapsedRealtimeNano()
DSystemClock_test.cpp55 timespec ts; in TEST() local
56 ts.tv_sec = 0; in TEST()
57 ts.tv_nsec = SLEEP_MS * MS_IN_NS; in TEST()
58 auto nanosleepErr = TEMP_FAILURE_RETRY(nanosleep(&ts, nullptr)); in TEST()
/system/libbase/
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.cpp155 static void DurationToTimeSpec(timespec& ts, const std::chrono::milliseconds d) { in DurationToTimeSpec() argument
158 ts.tv_sec = std::min<std::chrono::seconds::rep>(s.count(), std::numeric_limits<time_t>::max()); in DurationToTimeSpec()
159 ts.tv_nsec = ns.count(); in DurationToTimeSpec()
164 static void UpdateTimeSpec(timespec& ts, std::chrono::milliseconds relative_timeout, in UpdateTimeSpec() argument
169 ts = { 0, 0 }; in UpdateTimeSpec()
172 DurationToTimeSpec(ts, remaining_timeout); in UpdateTimeSpec()
189 timespec ts; in WaitForPropertyCreation() local
190 UpdateTimeSpec(ts, relative_timeout, start_time); in WaitForPropertyCreation()
191 if (!__system_property_wait(nullptr, global_serial, &global_serial, &ts)) return nullptr; in WaitForPropertyCreation()
206 timespec ts; in WaitForProperty() local
[all …]
/system/logging/liblog/
Dpmsg_writer.cpp70 int PmsgWrite(log_id_t logId, struct timespec* ts, struct iovec* vec, size_t nr) { in PmsgWrite() argument
127 header.realtime.tv_sec = ts->tv_sec; in PmsgWrite()
128 header.realtime.tv_nsec = ts->tv_nsec; in PmsgWrite()
188 struct timespec ts; in __android_log_pmsg_file_write() local
199 clock_gettime(CLOCK_REALTIME, &ts); in __android_log_pmsg_file_write()
224 for (ts.tv_nsec = 0, length = len; length; ts.tv_nsec += ANDROID_LOG_PMSG_FILE_SEQUENCE) { in __android_log_pmsg_file_write()
228 if ((ts.tv_nsec / ANDROID_LOG_PMSG_FILE_SEQUENCE) >= ANDROID_LOG_PMSG_FILE_MAX_SEQUENCE) { in __android_log_pmsg_file_write()
244 ret = PmsgWrite(logId, &ts, vec, sizeof(vec) / sizeof(vec[0])); in __android_log_pmsg_file_write()
/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/libcutils/
Dtrace-container.cpp127 struct timespec ts; in gettime() local
128 clock_gettime(clk_id, &ts); in gettime()
129 return ts.tv_sec * 1000000 + ts.tv_nsec / 1000; in gettime()
138 uint64_t ts = gettime(CLOCK_MONOTONIC); \
143 pid, tid, ts, tts, name, value); \
152 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/debuggerd/
Dutil.cpp63 timespec ts; in get_timestamp() local
64 clock_gettime(CLOCK_REALTIME, &ts); in get_timestamp()
67 localtime_r(&ts.tv_sec, &tm); in get_timestamp()
73 n = snprintf(s, sz, ":%02d.%09ld", tm.tm_sec, ts.tv_nsec), s += n, sz -= n; in get_timestamp()
/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/unwinding/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/libhwbinder/
DBufferedTextOutput.cpp250 thread_local ThreadState ts; in getBuffer() local
251 while (ts.states.size() <= (size_t)mIndex) ts.states.add(nullptr); in getBuffer()
252 BufferState* bs = ts.states[mIndex].get(); in getBuffer()
255 ts.states.editItemAt(mIndex) = new BufferState(mIndex); in getBuffer()
256 bs = ts.states[mIndex].get(); in getBuffer()
/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/core/libstats/push_compat/
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()
/system/chre/platform/linux/
Dsystem_timer.cc32 void NanosecondsToTimespec(uint64_t ns, struct timespec *ts) { in NanosecondsToTimespec() argument
33 ts->tv_sec = ns / kOneSecondInNanoseconds; in NanosecondsToTimespec()
34 ts->tv_nsec = ns % kOneSecondInNanoseconds; in NanosecondsToTimespec()
/system/extras/simpleperf/
Denvironment.h139 timespec ts; in GetSystemClock() local
141 clock_gettime(CLOCK_MONOTONIC, &ts); in GetSystemClock()
142 return ts.tv_sec * 1000000000ULL + ts.tv_nsec; in GetSystemClock()

12