/system/core/liblog/tests/ |
H A D | log_time_test.cpp | 30 struct timespec ts; local 31 clock_gettime(CLOCK_MONOTONIC, &ts); 32 log_time tl(ts); 34 EXPECT_EQ(tl, ts); 35 EXPECT_GE(tl, ts); 36 EXPECT_LE(tl, ts);
|
H A D | log_read_test.cpp | 41 struct timespec ts; local 42 clock_gettime(CLOCK_MONOTONIC, &ts); 43 std::string buf = android::base::StringPrintf("pid=%u ts=%ld.%09ld", pid, 44 ts.tv_sec, ts.tv_nsec);
|
/system/core/libutils/ |
H A D | SystemClock.cpp | 60 struct timespec ts; local 61 int err = clock_gettime(CLOCK_BOOTTIME, &ts); 68 return seconds_to_nanoseconds(ts.tv_sec) + ts.tv_nsec;
|
/system/core/libutils/tests/ |
H A D | SystemClock_test.cpp | 47 timespec ts; local 48 ts.tv_sec = 0; 49 ts.tv_nsec = SLEEP_MS * MS_IN_NS; 50 auto nanosleepErr = TEMP_FAILURE_RETRY(nanosleep(&ts, nullptr));
|
/system/extras/simpleperf/ |
H A D | environment.h | 78 timespec ts; local 80 clock_gettime(CLOCK_MONOTONIC, &ts); 81 return ts.tv_sec * 1000000000ULL + ts.tv_nsec;
|
/system/media/audio_utils/include/audio_utils/ |
H A D | clock.h | 74 audio_utils_time_string_t ts; local 76 audio_utils_ns_to_string(ns, ts.time, sizeof(ts.time)); 77 return ts; 82 * \param ts input timespec to convert. 85 static inline int64_t audio_utils_ns_from_timespec(const struct timespec *ts) argument 87 return ts->tv_sec * 1000000000LL + ts->tv_nsec;
|
/system/core/libcutils/ |
H A D | socket_network_client_unix.c | 82 struct timeval ts; local 83 ts.tv_sec = timeout; 84 ts.tv_usec = 0; 85 if ((rc = select(s + 1, &r_set, &w_set, NULL, (timeout != 0) ? &ts : NULL)) == -1) {
|
/system/bt/btif/src/ |
H A D | btif_debug_conn.cc | 31 uint64_t ts; member in struct:conn_event_t 40 static char* format_ts(const uint64_t ts, char* buffer, int len) { argument 41 const uint64_t ms = ts / 1000; 73 evt->ts = time_gettimeofday_us(); 87 if (connection_events[dump_event].ts == 0) dprintf(fd, " None\n"); 89 while (connection_events[dump_event].ts) { 91 dprintf(fd, " %s %s %s", format_ts(evt->ts, ts_buffer, sizeof(ts_buffer)),
|
/system/chre/platform/linux/ |
H A D | system_timer.cc | 32 void NanosecondsToTimespec(uint64_t ns, struct timespec *ts) { argument 33 ts->tv_sec = ns / kOneSecondInNanoseconds; 34 ts->tv_nsec = ns % kOneSecondInNanoseconds;
|
/system/connectivity/wificond/tests/ |
H A D | shell_utils.cpp | 51 struct timespec ts; local 52 clock_gettime(CLOCK_MONOTONIC, &ts); 53 return (int64_t{ts.tv_sec} * kMillisecondsPerSecond) + 54 (ts.tv_nsec / kNanosecondsPerMillisecond);
|
/system/core/include/utils/ |
H A D | Condition.h | 119 struct timespec ts; local 121 clock_gettime(CLOCK_MONOTONIC, &ts); 126 ts.tv_sec = t.tv_sec; 127 ts.tv_nsec = t.tv_usec*1000; 133 ts.tv_nsec += static_cast<long>(reltime%1000000000); 134 if (reltime_sec < INT64_MAX && ts.tv_nsec >= 1000000000) { 135 ts.tv_nsec -= 1000000000; 139 int64_t time_sec = ts.tv_sec; 146 ts.tv_sec = (time_sec > LONG_MAX) ? LONG_MAX : static_cast<long>(time_sec); 148 return -pthread_cond_timedwait(&mCond, &mutex.mMutex, &ts); [all...] |
H A D | Mutex.h | 143 const struct timespec ts = { local 147 return -pthread_mutex_timedlock(&mMutex, &ts);
|
/system/core/libbacktrace/ |
H A D | ThreadEntry.cpp | 100 timespec ts; local 101 clock_gettime(CLOCK_MONOTONIC, &ts); 102 ts.tv_sec += 5; 107 int ret = pthread_cond_timedwait(&wait_cond_, &wait_mutex_, &ts);
|
/system/core/liblog/ |
H A D | logd_writer.c | 48 static int logdWrite(log_id_t logId, struct timespec* ts, struct iovec* vec, 127 static int logdWrite(log_id_t logId, struct timespec* ts, struct iovec* vec, argument 177 header.realtime.tv_sec = ts->tv_sec; 178 header.realtime.tv_nsec = ts->tv_nsec;
|
H A D | stderr_write.c | 48 static int stderrWrite(log_id_t logId, struct timespec* ts, struct iovec* vec, 150 static int stderrWrite(log_id_t logId, struct timespec* ts, struct iovec* vec, argument 170 log_msg.entry.sec = ts->tv_sec; 171 log_msg.entry.nsec = ts->tv_nsec;
|
H A D | pmsg_writer.c | 40 static int pmsgWrite(log_id_t logId, struct timespec* ts, struct iovec* vec, 99 static int pmsgWrite(log_id_t logId, struct timespec* ts, struct iovec* vec, argument 149 header.realtime.tv_sec = ts->tv_sec; 150 header.realtime.tv_nsec = ts->tv_nsec; 215 struct timespec ts; local 226 clock_gettime(android_log_clockid(), &ts); local 252 for (ts.tv_nsec = 0, length = len; length; 253 ts.tv_nsec += ANDROID_LOG_PMSG_FILE_SEQUENCE) { 257 if ((ts.tv_nsec / ANDROID_LOG_PMSG_FILE_SEQUENCE) >= 288 ret = pmsgWrite(logId, &ts, ve [all...] |
H A D | local_logger.c | 45 static int writeToLocalWrite(log_id_t logId, struct timespec* ts, 289 static int writeToLocalWrite(log_id_t logId, struct timespec* ts, argument 311 element->timestamp.tv_sec = ts->tv_sec; 312 element->timestamp.tv_nsec = ts->tv_nsec;
|
H A D | logger_write.c | 247 struct timespec ts; local 258 clock_gettime(android_log_clockid(), &ts); local 347 /* simulate clock_gettime(CLOCK_REALTIME, &ts); */ 351 ts.tv_sec = tv.tv_sec; 352 ts.tv_nsec = tv.tv_usec * 1000; 361 retval = (*node->write)(log_id, &ts, vec, nr); 370 (void)(*node->write)(log_id, &ts, vec, nr);
|
/system/core/libutils/include/utils/ |
H A D | Condition.h | 119 struct timespec ts; local 121 clock_gettime(CLOCK_MONOTONIC, &ts); 126 ts.tv_sec = t.tv_sec; 127 ts.tv_nsec = t.tv_usec*1000; 133 ts.tv_nsec += static_cast<long>(reltime%1000000000); 134 if (reltime_sec < INT64_MAX && ts.tv_nsec >= 1000000000) { 135 ts.tv_nsec -= 1000000000; 139 int64_t time_sec = ts.tv_sec; 146 ts.tv_sec = (time_sec > LONG_MAX) ? LONG_MAX : static_cast<long>(time_sec); 148 return -pthread_cond_timedwait(&mCond, &mutex.mMutex, &ts); [all...] |
H A D | Mutex.h | 143 const struct timespec ts = { local 147 return -pthread_mutex_timedlock(&mMutex, &ts);
|
/system/extras/sane_schedstat/ |
H A D | sane_schedstat.c | 113 unsigned long long ts; local 122 if (!b || sscanf(b, "timestamp %llu\n", &ts) != 1) {
|
/system/connectivity/wifilogd/tests/ |
H A D | os_unittest.cpp | 31 inline void PrintTo(const timespec& ts, ::std::ostream* os) { argument 32 *os << "[secs:" << ts.tv_sec << " " 33 << "nsecs:" << ts.tv_nsec << "]";
|
/system/core/base/ |
H A D | properties.cpp | 104 static void DurationToTimeSpec(timespec& ts, std::chrono::nanoseconds d) { argument 107 ts.tv_sec = s.count(); 108 ts.tv_nsec = ns.count(); 113 static void UpdateTimeSpec(timespec& ts, argument 118 ts = { 0, 0 }; 120 DurationToTimeSpec(ts, remaining_timeout); 141 timespec ts; local 142 UpdateTimeSpec(ts, absolute_timeout); 143 if (!__system_property_wait(nullptr, global_serial, &global_serial, &ts)) return nullptr; 159 timespec ts; local [all...] |
/system/core/storaged/ |
H A D | storaged_utils.cpp | 46 struct timespec ts; local 49 int ret = clock_gettime(CLOCK_MONOTONIC, &ts); 68 stats->end_time = (uint64_t)ts.tv_sec * SEC_TO_MSEC + 69 ts.tv_nsec / (MSEC_TO_USEC * USEC_TO_NSEC);
|
/system/bt/osi/src/ |
H A D | wakelock.cc | 228 struct timespec ts; local 229 if (clock_gettime(CLOCK_ID, &ts) == -1) { 235 return (ts.tv_sec * 1000LL) + (ts.tv_nsec / 1000000LL);
|