Searched defs:ts (Results 1 - 25 of 44) sorted by relevance

12

/system/core/liblog/tests/
H A Dlog_time_test.cpp30 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 Dlog_read_test.cpp42 struct timespec ts; local
43 clock_gettime(CLOCK_MONOTONIC, &ts);
44 std::string buf = android::base::StringPrintf("pid=%u ts=%ld.%09ld", pid,
45 ts.tv_sec, ts.tv_nsec);
/system/core/base/
H A Dchrono_utils.cpp26 timespec ts; local
27 clock_gettime(CLOCK_BOOTTIME, &ts);
28 return boot_clock::time_point(std::chrono::seconds(ts.tv_sec) +
29 std::chrono::nanoseconds(ts.tv_nsec));
H A Dproperties.cpp108 static void DurationToTimeSpec(timespec& ts, const std::chrono::milliseconds d) { argument
111 ts.tv_sec = std::min<std::chrono::seconds::rep>(s.count(), std::numeric_limits<time_t>::max());
112 ts.tv_nsec = ns.count();
118 static void UpdateTimeSpec(timespec& ts, std::chrono::milliseconds relative_timeout, argument
123 ts = { 0, 0 };
126 DurationToTimeSpec(ts, remaining_timeout);
143 timespec ts; local
144 UpdateTimeSpec(ts, relative_timeout, start_time);
145 if (!__system_property_wait(nullptr, global_serial, &global_serial, &ts)) return nullptr;
160 timespec ts; local
[all...]
/system/core/libutils/
H A DSystemClock.cpp60 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 DSystemClock_test.cpp47 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 Denvironment.h80 timespec ts; local
82 clock_gettime(CLOCK_MONOTONIC, &ts);
83 return ts.tv_sec * 1000000000ULL + ts.tv_nsec;
/system/extras/simpleperf/runtest/
H A Drun_and_sleep.cpp9 timespec ts; local
11 clock_gettime(CLOCK_MONOTONIC, &ts);
12 return ts.tv_sec * 1000000000ULL + ts.tv_nsec;
/system/core/libcutils/
H A Dsocket_network_client_unix.cpp82 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) {
H A Dtrace-container.cpp118 struct timespec ts; local
119 clock_gettime(clk_id, &ts);
120 return ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
129 uint64_t ts = gettime(CLOCK_MONOTONIC); \
134 pid, tid, ts, tts, name, value); \
143 pid, tid, ts, tts, name_len, name, value); \
/system/netd/libnetdutils/
H A DSyscalls.cpp111 timespec ts = {}; variable
112 ts.tv_sec = timeout;
113 ts.tv_nsec = (timeout - ts.tv_sec) * 1e9;
114 auto rv = syscallRetry(::ppoll, fds, nfds, &ts, nullptr);
/system/bt/btif/src/
H A Dbtif_debug_conn.cc30 uint64_t ts; member in struct:conn_event_t
39 static char* format_ts(const uint64_t ts, char* buffer, int len) { argument
40 const uint64_t ms = ts / 1000;
72 evt->ts = time_gettimeofday_us();
85 if (connection_events[dump_event].ts == 0) dprintf(fd, " None\n");
87 while (connection_events[dump_event].ts) {
89 dprintf(fd, " %s %s %s", format_ts(evt->ts, ts_buffer, sizeof(ts_buffer)),
/system/chre/platform/linux/
H A Dsystem_timer.cc32 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 Dshell_utils.cpp51 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 DCondition.h121 struct timespec ts; local
123 clock_gettime(CLOCK_MONOTONIC, &ts);
128 ts.tv_sec = t.tv_sec;
129 ts.tv_nsec = t.tv_usec*1000;
135 ts.tv_nsec += static_cast<long>(reltime%1000000000);
136 if (reltime_sec < INT64_MAX && ts.tv_nsec >= 1000000000) {
137 ts.tv_nsec -= 1000000000;
141 int64_t time_sec = ts.tv_sec;
148 ts.tv_sec = (time_sec > LONG_MAX) ? LONG_MAX : static_cast<long>(time_sec);
150 return -pthread_cond_timedwait(&mCond, &mutex.mMutex, &ts);
[all...]
/system/core/libbacktrace/
H A DThreadEntry.cpp100 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 Dlogd_writer.c48 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 Dstderr_write.c48 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 Dpmsg_writer.c40 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...]
/system/core/libstats/
H A Dstatsd_writer.c61 static int statsdWrite(struct timespec* ts, struct iovec* vec, size_t nr);
134 static int statsdWrite(struct timespec* ts, struct iovec* vec, size_t nr) { argument
171 header.realtime.tv_sec = ts->tv_sec;
172 header.realtime.tv_nsec = ts->tv_nsec;
H A Dstats_event_list.c135 struct timespec ts; local
146 clock_gettime(CLOCK_REALTIME, &ts);
151 retval = (*statsdLoggerWrite.write)(&ts, vec, nr);
/system/core/libutils/include/utils/
H A DCondition.h121 struct timespec ts; local
123 clock_gettime(CLOCK_MONOTONIC, &ts);
128 ts.tv_sec = t.tv_sec;
129 ts.tv_nsec = t.tv_usec*1000;
135 ts.tv_nsec += static_cast<long>(reltime%1000000000);
136 if (reltime_sec < INT64_MAX && ts.tv_nsec >= 1000000000) {
137 ts.tv_nsec -= 1000000000;
141 int64_t time_sec = ts.tv_sec;
148 ts.tv_sec = (time_sec > LONG_MAX) ? LONG_MAX : static_cast<long>(time_sec);
150 return -pthread_cond_timedwait(&mCond, &mutex.mMutex, &ts);
[all...]
/system/extras/sane_schedstat/
H A Dsane_schedstat.c113 unsigned long long ts; local
122 if (!b || sscanf(b, "timestamp %llu\n", &ts) != 1) {
/system/media/audio_utils/include/audio_utils/
H A Dclock.h82 audio_utils_time_string_t ts; local
84 audio_utils_ns_to_string(ns, ts.time, sizeof(ts.time));
85 return ts;
90 * \param ts input timespec to convert.
93 static inline int64_t audio_utils_ns_from_timespec(const struct timespec *ts) argument
95 return ts->tv_sec * 1000000000LL + ts->tv_nsec;
/system/connectivity/wifilogd/tests/
H A Dos_unittest.cpp31 inline void PrintTo(const timespec& ts, ::std::ostream* os) { argument
32 *os << "[secs:" << ts.tv_sec << " "
33 << "nsecs:" << ts.tv_nsec << "]";

Completed in 446 milliseconds

12