/system/bt/btif/src/ |
D | btif_sock_thread.cc | 95 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 …]
|
D | btif_debug_conn.cc | 30 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/ |
D | log_time_test.cpp | 24 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()
|
D | liblog_benchmark.cpp | 201 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 …]
|
D | log_read_test.cpp | 42 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/ |
D | Condition.h | 121 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/ |
D | clock.h | 93 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/ |
D | BufferedTextOutput.cpp | 101 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/ |
D | SystemClock.cpp | 60 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()
|
D | SystemClock_test.cpp | 47 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/ |
D | chrono_utils.cpp | 26 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()
|
D | properties.cpp | 125 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/ |
D | run_and_sleep.cpp | 9 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/ |
D | pmsg_writer.cpp | 41 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/ |
D | trace-container.cpp | 118 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); \
|
D | socket_network_client_unix.cpp | 82 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/ |
D | native-lib.cpp | 69 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/ |
D | storaged_diskstats.cpp | 69 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/ |
D | ThreadEntry.cpp | 100 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/ |
D | native-lib.cpp | 65 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/ |
D | shell_utils.cpp | 51 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/ |
D | WakeupControllerTest.cpp | 108 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/ |
D | environment.h | 89 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/ |
D | raw_os.cpp | 34 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/ |
D | stats_event_list.c | 149 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()
|