Home
last modified time | relevance | path

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

12345678910>>...19

/aosp12/system/bt/btif/src/
H A Dbtif_sock_thread.cc137 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()
190 asrt(ts[h].cmd_fdr == -1 && ts[h].cmd_fdw == -1); in init_cmd_fd()
201 ts[h].cmd_fdr = -1; in close_cmd_fd()
205 ts[h].cmd_fdw = -1; in close_cmd_fd()
336 ts[h].poll_count = 0; in init_poll()
342 ts[h].psi[i] = -1; in init_poll()
[all …]
/aosp12/hardware/qcom/camera/msm8998/QCamera2/stack/mm-camera-test/src/
H A Dcam_semaphore_tests.cpp31 ts.tv_sec += ms / 1000; in timespec_add_ms()
32 ts.tv_nsec += (ms % 1000) * 1000000; in timespec_add_ms()
33 if (ts.tv_nsec >= NS_PER_S) { in timespec_add_ms()
34 ts.tv_sec++; in timespec_add_ms()
35 ts.tv_nsec -= NS_PER_S; in timespec_add_ms()
55 timespec ts; in TEST() local
57 timespec_add_ms(ts, 100); in TEST()
60 ASSERT_EQ(-1, cam_sem_timedwait(&sem, &ts)); in TEST()
66 ASSERT_GE(time_diff(ts, ts_end), 0); in TEST()
71 timespec_add_ms(ts, 100); in TEST()
[all …]
/aosp12/bionic/libc/bionic/
H A Dpoll.cpp42 timespec ts; in poll() local
45 timespec_from_ms(ts, ms); in poll()
46 ts_ptr = &ts; in poll()
67 if (ts != nullptr) { in ppoll64()
68 mutable_ts = *ts; in ppoll64()
83 timespec ts; in select() local
86 if (!timespec_from_timeval(ts, *tv)) { in select()
90 ts_ptr = &ts; in select()
94 timeval_from_timespec(*tv, ts); in select()
117 if (ts != nullptr) { in pselect64()
[all …]
H A Dbionic_time_conversions.cpp33 bool timespec_from_timeval(timespec& ts, const timeval& tv) { in timespec_from_timeval() argument
35 ts.tv_sec = tv.tv_sec; in timespec_from_timeval()
41 ts.tv_nsec = tv.tv_usec * 1000; in timespec_from_timeval()
45 void timespec_from_ms(timespec& ts, const int ms) { in timespec_from_ms() argument
46 ts.tv_sec = ms / 1000; in timespec_from_ms()
47 ts.tv_nsec = (ms % 1000) * 1000000; in timespec_from_ms()
50 void timeval_from_timespec(timeval& tv, const timespec& ts) { in timeval_from_timespec() argument
51 tv.tv_sec = ts.tv_sec; in timeval_from_timespec()
52 tv.tv_usec = ts.tv_nsec / 1000; in timeval_from_timespec()
H A Dsys_time.cpp38 timespec ts[2]; in futimesat() local
39 if (tv && (!timespec_from_timeval(ts[0], tv[0]) || !timespec_from_timeval(ts[1], tv[1]))) { in futimesat()
43 return utimensat(fd, path, tv ? ts : nullptr, flags); in futimesat()
59 timespec ts[2]; in futimes() local
60 if (tv && (!timespec_from_timeval(ts[0], tv[0]) || !timespec_from_timeval(ts[1], tv[1]))) { in futimes()
64 return futimens(fd, tv ? ts : nullptr); in futimes()
/aosp12/bionic/libc/private/
H A Dbionic_time_conversions.h40 __LIBC_HIDDEN__ bool timespec_from_timeval(timespec& ts, const timeval& tv);
41 __LIBC_HIDDEN__ void timespec_from_ms(timespec& ts, const int ms);
43 __LIBC_HIDDEN__ void timeval_from_timespec(timeval& tv, const timespec& ts);
50 static inline int check_timespec(const timespec* ts, bool null_allowed) { in check_timespec() argument
51 if (null_allowed && ts == nullptr) { in check_timespec()
56 if (ts->tv_nsec < 0 || ts->tv_nsec >= NS_PER_S) { in check_timespec()
59 if (ts->tv_sec < 0) { in check_timespec()
66 static inline void absolute_timespec_from_timespec(timespec& abs_ts, const timespec& ts, clockid_t … in absolute_timespec_from_timespec() argument
68 abs_ts.tv_sec += ts.tv_sec; in absolute_timespec_from_timespec()
69 abs_ts.tv_nsec += ts.tv_nsec; in absolute_timespec_from_timespec()
/aosp12/bionic/tests/
H A Dtime_test.cpp780 timespec ts; in TEST() local
785 timespec ts; in TEST() local
790 timespec ts; in TEST() local
795 timespec ts; in TEST() local
800 timespec ts; in TEST() local
806 timespec ts; in TEST() local
812 timespec ts; in TEST() local
819 timespec ts; in TEST() local
826 timespec ts; in TEST() local
831 timespec ts; in TEST() local
[all …]
H A Dsemaphore_test.cpp100 ts.tv_sec += ms / 1000; in timespec_add_ms()
101 ts.tv_nsec += (ms % 1000) * 1000000; in timespec_add_ms()
102 if (ts.tv_nsec >= NS_PER_S) { in timespec_add_ms()
103 ts.tv_sec++; in timespec_add_ms()
104 ts.tv_nsec -= NS_PER_S; in timespec_add_ms()
113 timespec ts; in sem_timedwait_helper() local
115 timespec_add_ms(ts, 100); in sem_timedwait_helper()
123 ts.tv_nsec = -1; in sem_timedwait_helper()
127 ts.tv_nsec = NS_PER_S; in sem_timedwait_helper()
132 ts.tv_nsec = NS_PER_S - 1; in sem_timedwait_helper()
[all …]
/aosp12/hardware/invensense/6515/libsensors_iio/software/simple_apps/playback/linux/
H A Dand_constructor.c112 inv_time_t ts; in inv_playback() local
147 r = fread(&ts, sizeof(ts), 1, inv_construct.file); in inv_playback()
148 inv_build_gyro(gyro, ts); in inv_playback()
156 r = fread(&ts, sizeof(ts), 1, inv_construct.file); in inv_playback()
158 inv_build_accel(accel, 0, ts); in inv_playback()
167 r = fread(&ts, sizeof(ts), 1, inv_construct.file); in inv_playback()
169 inv_build_compass(compass, 0, ts); in inv_playback()
176 r = fread(&ts, sizeof(ts), 1, inv_construct.file); in inv_playback()
177 inv_build_temp(buffer[0], ts); in inv_playback()
179 buffer[0], ts); in inv_playback()
[all …]
/aosp12/frameworks/native/services/surfaceflinger/tests/fakehwc/
H A DSFFakeHwc_test.cpp1359 ts.hide(mFGSurfaceControl); in Test_LayerShowHide()
1370 ts.show(mFGSurfaceControl); in Test_LayerShowHide()
1560 ts.show(mChild); in Test_Positioning()
1587 ts.show(mChild); in Test_Cropping()
1588 ts.setPosition(mChild, 0, 0); in Test_Cropping()
1606 ts.show(mChild); in Test_Constraints()
1641 ts.show(mChild); in Test_LayerAlpha()
1644 ts.setAlpha(mChild, 0.5); in Test_LayerAlpha()
1703 ts.setColor(Base::mChild, in SetUp()
1719 ts.show(Base::mChild); in Test_LayerAlpha()
[all …]
/aosp12/frameworks/av/media/libcpustats/
H A DThreadCpuUsage.cpp64 struct timespec ts; in setEnabled() local
65 rc = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); in setEnabled()
70 (ts.tv_nsec - mPreviousTs.tv_nsec); in setEnabled()
73 mPreviousTs = ts; in setEnabled()
106 struct timespec ts; in sample() local
108 rc = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); in sample()
115 (ts.tv_nsec - mPreviousTs.tv_nsec); in sample()
117 mPreviousTs = ts; in sample()
137 struct timespec ts; in elapsed() local
139 rc = clock_gettime(CLOCK_MONOTONIC, &ts); in elapsed()
[all …]
/aosp12/system/core/libutils/include/utils/
H A 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()
/aosp12/hardware/qcom/gps/msm8960/utils/
H A Dloc_timer.c49 struct timespec ts; in timer_thread() local
74 clock_gettime(CLOCK_REALTIME, &ts); in timer_thread()
76 ts.tv_sec += t.time_msec/1000; in timer_thread()
80 ts.tv_nsec += t.time_msec * 1000000; in timer_thread()
81 if(ts.tv_nsec > 999999999) { in timer_thread()
83 ts.tv_sec += 1; in timer_thread()
84 ts.tv_nsec -= 1000000000; in timer_thread()
87 __func__, __LINE__, (int)ts.tv_sec, (int)ts.tv_nsec); in timer_thread()
91 ret = pthread_cond_timedwait(&timer_cond, &timer_mutex, &ts); in timer_thread()
/aosp12/hardware/qcom/sdm845/gps/msm8960/utils/
H A Dloc_timer.c49 struct timespec ts; in timer_thread() local
74 clock_gettime(CLOCK_REALTIME, &ts); in timer_thread()
76 ts.tv_sec += t.time_msec/1000; in timer_thread()
80 ts.tv_nsec += t.time_msec * 1000000; in timer_thread()
81 if(ts.tv_nsec > 999999999) { in timer_thread()
83 ts.tv_sec += 1; in timer_thread()
84 ts.tv_nsec -= 1000000000; in timer_thread()
87 __func__, __LINE__, (int)ts.tv_sec, (int)ts.tv_nsec); in timer_thread()
91 ret = pthread_cond_timedwait(&timer_cond, &timer_mutex, &ts); in timer_thread()
/aosp12/system/logging/liblog/tests/
H A 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()
/aosp12/hardware/st/secure_element2/secure_element/1.0/esehal/src/
H A Dtransport.c74 struct timespec ts = { sec, ns }; in ts_add_ns() local
76 return ts; in ts_add_ns()
114 struct timespec ts, ts_timeout; in block_recv() local
122 clock_gettime(CLOCK_MONOTONIC, &ts); in block_recv()
126 ts_timeout = ts_add_ns(ts, bwt * NSEC_PER_MSEC); in block_recv()
132 ts = ts_add_ns(ts, 2 * NSEC_PER_MSEC); in block_recv()
133 while (clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &ts, NULL)) in block_recv()
141 if (ts_compare(&ts, &ts_timeout) >= 0) in block_recv()
/aosp12/hardware/libhardware/modules/radio/
H A Dradio_hw.c133 struct timespec ts; member
147 struct timespec ts; in send_command_l() local
165 ts.tv_sec += delay_ms/1000; in send_command_l()
169 ts.tv_sec += 1; in send_command_l()
171 cmd->ts = ts; in send_command_l()
216 struct timespec ts; in prepare_metadata() local
301 ts.tv_sec = 0; in callback_thread_loop()
479 (cmd->ts.tv_sec < ts.tv_sec) || in callback_thread_loop()
480 ((cmd->ts.tv_sec == ts.tv_sec) && (cmd->ts.tv_nsec < ts.tv_nsec))) { in callback_thread_loop()
481 ts.tv_sec = cmd->ts.tv_sec; in callback_thread_loop()
[all …]
/aosp12/frameworks/av/media/libnblog/
H A DMerger.cpp66 int64_t ts; member
68 MergeItem(int64_t ts, int index): ts(ts), index(index) {} in MergeItem()
73 return i1.ts > i2.ts || (i1.ts == i2.ts && i1.index > i2.index); in operator >()
112 int64_t ts = AbstractEntry::buildEntry(offsets[index])->timestamp(); in merge() local
113 timestamps.emplace(ts, index); in merge()
143 mThreadPerformanceAnalysis[author][0 /*hash*/].logTsEntry(payload.ts); in processSnapshot()
171 const int64_t ts = it.payload<int64_t>(); in processSnapshot() local
173 data.snapshots.emplace_front(EVENT_UNDERRUN, ts); in processSnapshot()
180 const int64_t ts = it.payload<int64_t>(); in processSnapshot() local
182 data.snapshots.emplace_front(EVENT_UNDERRUN, ts); in processSnapshot()
/aosp12/art/libartbase/base/
H A Dtime_utils.cc232 clock_gettime(clock, ts); in InitTimeSpec()
237 ts->tv_sec = tv.tv_sec; in InitTimeSpec()
238 ts->tv_nsec = tv.tv_usec * 1000; in InitTimeSpec()
241 ts->tv_sec = 0; in InitTimeSpec()
242 ts->tv_nsec = 0; in InitTimeSpec()
245 int64_t end_sec = ts->tv_sec + ms / 1000; in InitTimeSpec()
257 ts->tv_sec = end_sec; in InitTimeSpec()
258 ts->tv_nsec = (ts->tv_nsec + (ms % 1000) * 1000000) + ns; in InitTimeSpec()
261 if (ts->tv_nsec >= 1000000000L) { in InitTimeSpec()
262 ts->tv_sec++; in InitTimeSpec()
[all …]
/aosp12/system/media/audio_utils/include/audio_utils/
H A 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()
/aosp12/hardware/qcom/gps/msm8994/utils/
H A Dloc_timer.c56 struct timespec ts; in timer_thread() local
63 clock_gettime(CLOCK_REALTIME, &ts); in timer_thread()
65 ts.tv_sec += t->time_msec/1000; in timer_thread()
69 ts.tv_nsec += t->time_msec * 1000000; in timer_thread()
70 if(ts.tv_nsec > 999999999) { in timer_thread()
72 ts.tv_sec += 1; in timer_thread()
73 ts.tv_nsec -= 1000000000; in timer_thread()
77 __func__, __LINE__, (int)ts.tv_sec, (int)ts.tv_nsec, in timer_thread()
83 ret = pthread_cond_timedwait(&t->timer_cond, &t->timer_mutex, &ts); in timer_thread()
/aosp12/hardware/qcom/gps/utils/
H A Dloc_timer.c56 struct timespec ts; in timer_thread() local
63 clock_gettime(CLOCK_REALTIME, &ts); in timer_thread()
65 ts.tv_sec += t->time_msec/1000; in timer_thread()
69 ts.tv_nsec += t->time_msec * 1000000; in timer_thread()
70 if(ts.tv_nsec > 999999999) { in timer_thread()
72 ts.tv_sec += 1; in timer_thread()
73 ts.tv_nsec -= 1000000000; in timer_thread()
77 __func__, __LINE__, (int)ts.tv_sec, (int)ts.tv_nsec, in timer_thread()
83 ret = pthread_cond_timedwait(&t->timer_cond, &t->timer_mutex, &ts); in timer_thread()
/aosp12/hardware/qcom/gps/msm8084/utils/
H A Dloc_timer.c56 struct timespec ts; in timer_thread() local
63 clock_gettime(CLOCK_REALTIME, &ts); in timer_thread()
65 ts.tv_sec += t->time_msec/1000; in timer_thread()
69 ts.tv_nsec += t->time_msec * 1000000; in timer_thread()
70 if(ts.tv_nsec > 999999999) { in timer_thread()
72 ts.tv_sec += 1; in timer_thread()
73 ts.tv_nsec -= 1000000000; in timer_thread()
77 __func__, __LINE__, (int)ts.tv_sec, (int)ts.tv_nsec, in timer_thread()
83 ret = pthread_cond_timedwait(&t->timer_cond, &t->timer_mutex, &ts); in timer_thread()
/aosp12/hardware/qcom/sdm845/gps/msm8084/utils/
H A Dloc_timer.c56 struct timespec ts; in timer_thread() local
63 clock_gettime(CLOCK_REALTIME, &ts); in timer_thread()
65 ts.tv_sec += t->time_msec/1000; in timer_thread()
69 ts.tv_nsec += t->time_msec * 1000000; in timer_thread()
70 if(ts.tv_nsec > 999999999) { in timer_thread()
72 ts.tv_sec += 1; in timer_thread()
73 ts.tv_nsec -= 1000000000; in timer_thread()
77 __func__, __LINE__, (int)ts.tv_sec, (int)ts.tv_nsec, in timer_thread()
83 ret = pthread_cond_timedwait(&t->timer_cond, &t->timer_mutex, &ts); in timer_thread()
/aosp12/hardware/qcom/sdm845/gps/msm8994/utils/
H A Dloc_timer.c56 struct timespec ts; in timer_thread() local
63 clock_gettime(CLOCK_REALTIME, &ts); in timer_thread()
65 ts.tv_sec += t->time_msec/1000; in timer_thread()
69 ts.tv_nsec += t->time_msec * 1000000; in timer_thread()
70 if(ts.tv_nsec > 999999999) { in timer_thread()
72 ts.tv_sec += 1; in timer_thread()
73 ts.tv_nsec -= 1000000000; in timer_thread()
77 __func__, __LINE__, (int)ts.tv_sec, (int)ts.tv_nsec, in timer_thread()
83 ret = pthread_cond_timedwait(&t->timer_cond, &t->timer_mutex, &ts); in timer_thread()

12345678910>>...19