Lines Matching refs:ts

133     struct timespec ts;  member
147 struct timespec ts; in send_command_l() local
163 clock_gettime(CLOCK_REALTIME, &ts); in send_command_l()
165 ts.tv_sec += delay_ms/1000; in send_command_l()
166 ts.tv_nsec += (delay_ms%1000) * 1000000; in send_command_l()
167 if (ts.tv_nsec >= 1000000000) { in send_command_l()
168 ts.tv_nsec -= 1000000000; 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
250 clock_gettime(CLOCK_REALTIME, &ts); in prepare_metadata()
251 snprintf(text, RADIO_STRING_LEN_MAX, "Artist %ld", ts.tv_sec % 10); in prepare_metadata()
256 snprintf(text, RADIO_STRING_LEN_MAX, "Song %ld", ts.tv_nsec % 10); in prepare_metadata()
272 struct timespec ts = {0, 0}; in callback_thread_loop() local
292 if (list_empty(&tuner->command_list) || ts.tv_sec != 0) { in callback_thread_loop()
294 if (ts.tv_sec != 0) { in callback_thread_loop()
296 pthread_cond_timedwait(&tuner->cond, &tuner->lock, &ts); in callback_thread_loop()
301 ts.tv_sec = 0; in callback_thread_loop()
318 if ((cmd->ts.tv_sec < cur_ts.tv_sec) || in callback_thread_loop()
319 ((cmd->ts.tv_sec == cur_ts.tv_sec) && (cmd->ts.tv_nsec < cur_ts.tv_nsec))) { in callback_thread_loop()
326 ALOGV("%s processing command %d time %ld.%ld", __func__, cmd->type, cmd->ts.tv_sec, in callback_thread_loop()
327 cmd->ts.tv_nsec); in callback_thread_loop()
478 if ((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()
482 ts.tv_nsec = cmd->ts.tv_nsec; in callback_thread_loop()