Home
last modified time | relevance | path

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

/unit/src/
H A Dnxt_time.c27 struct timespec ts; in nxt_realtime() local
32 now->nsec = ts.tv_nsec; in nxt_realtime()
51 struct timespec ts; in nxt_realtime() local
56 now->nsec = ts.tv_nsec; in nxt_realtime()
74 struct timespec ts; in nxt_realtime() local
115 struct timespec ts; in nxt_monotonic_time() local
119 now->monotonic = (nxt_nsec_t) ts.tv_sec * 1000000000 + ts.tv_nsec; in nxt_monotonic_time()
138 struct timespec ts; in nxt_monotonic_time() local
142 now->monotonic = (nxt_nsec_t) ts.tv_sec * 1000000000 + ts.tv_nsec; in nxt_monotonic_time()
192 struct timespec ts; in nxt_monotonic_time() local
[all …]
H A Dnxt_thread_time.c38 nxt_time_string_t *ts, u_char *buf);
239 slot = nxt_thread_time_string_slot(ts); in nxt_thread_time_string()
260 if (ts->msec == NXT_THREAD_TIME_MSEC in nxt_thread_time_string()
274 if (ts->timezone == NXT_THREAD_TIME_LOCAL) { in nxt_thread_time_string()
325 p = nxt_zalloc(ts->size); in nxt_thread_time_string()
335 p = ts->handler(p, &thr->time.now.realtime, tm, ts->size, ts->format); in nxt_thread_time_string()
359 if (ts->timezone == NXT_THREAD_TIME_LOCAL) { in nxt_thread_time_string_no_cache()
373 return ts->handler(buf, &now, &tm, ts->size, ts->format); in nxt_thread_time_string_no_cache()
378 nxt_thread_time_string_slot(nxt_time_string_t *ts) in nxt_thread_time_string_slot() argument
388 if (nxt_atomic_cmp_set(&ts->slot, -1, -2)) { in nxt_thread_time_string_slot()
[all …]
H A Dnxt_buf.c60 nxt_buf_ts_t *ts; in nxt_buf_mem_ts_alloc() local
83 ts = nxt_pointer_to(b, NXT_BUF_MEM_SIZE); in nxt_buf_mem_ts_alloc()
84 ts->engine = task->thread->engine; in nxt_buf_mem_ts_alloc()
86 ts->work.handler = nxt_buf_ts_completion; in nxt_buf_mem_ts_alloc()
87 ts->work.task = task; in nxt_buf_mem_ts_alloc()
88 ts->work.obj = b; in nxt_buf_mem_ts_alloc()
89 ts->work.data = b->parent; in nxt_buf_mem_ts_alloc()
244 nxt_buf_ts_t *ts; in nxt_buf_ts_handle() local
258 ts->work.obj = obj; in nxt_buf_ts_handle()
259 ts->work.data = data; in nxt_buf_ts_handle()
[all …]
H A Dnxt_thread_cond.c65 struct timespec ts; in nxt_thread_cond_wait() local
90 ts.tv_sec = now->sec + ns / 1000000000; in nxt_thread_cond_wait()
91 ts.tv_nsec = ns % 1000000000; in nxt_thread_cond_wait()
93 err = pthread_cond_timedwait(cond, mtx, &ts); in nxt_thread_cond_wait()
H A Dnxt_semaphore.c82 struct timespec ts; in nxt_sem_wait() local
134 ts.tv_sec = now->sec + ns / 1000000000; in nxt_sem_wait()
135 ts.tv_nsec = ns % 1000000000; in nxt_sem_wait()
138 n = sem_timedwait(sem, &ts); in nxt_sem_wait()
H A Dnxt_listen_socket.c42 nxt_socket_t ts; in nxt_listen_socket_create() local
152 ts = nxt_socket_create(task, AF_UNIX, SOCK_STREAM, 0, 0); in nxt_listen_socket_create()
153 if (ts == -1) { in nxt_listen_socket_create()
157 ret = connect(ts, &orig_sa->u.sockaddr, orig_sa->socklen); in nxt_listen_socket_create()
161 nxt_socket_close(task, ts); in nxt_listen_socket_create()
165 ts, (size_t) orig_sa->length, in nxt_listen_socket_create()
173 ts, (size_t) orig_sa->length, in nxt_listen_socket_create()
H A Dnxt_thread_time.h69 nxt_time_string_t *ts, u_char *buf);
H A Dnxt_eventport_engine.c457 timespec_t ts, *tp; in nxt_eventport_poll() local
473 ts.tv_sec = timeout / 1000; in nxt_eventport_poll()
474 ts.tv_nsec = (timeout % 1000) * 1000000; in nxt_eventport_poll()
475 tp = &ts; in nxt_eventport_poll()
H A Dnxt_process.c953 struct timespec ts; in nxt_nanosleep() local
955 ts.tv_sec = ns / 1000000000; in nxt_nanosleep()
956 ts.tv_nsec = ns % 1000000000; in nxt_nanosleep()
958 (void) nanosleep(&ts, NULL); in nxt_nanosleep()
H A Dnxt_kqueue_engine.c675 struct timespec ts, *tp; in nxt_kqueue_poll() local
684 ts.tv_sec = timeout / 1000; in nxt_kqueue_poll()
685 ts.tv_nsec = (timeout % 1000) * 1000000; in nxt_kqueue_poll()
686 tp = &ts; in nxt_kqueue_poll()
H A Dnxt_unit.c6667 struct timespec ts; in nxt_unit_snprint_prefix() local
6669 (void) clock_gettime(CLOCK_REALTIME, &ts); in nxt_unit_snprint_prefix()
6672 (void) localtime_r(&ts.tv_sec, &tm); in nxt_unit_snprint_prefix()
6674 tm = *localtime(&ts.tv_sec); in nxt_unit_snprint_prefix()
6682 (int) ts.tv_nsec / 1000000); in nxt_unit_snprint_prefix()
/unit/auto/
H A Dtime17 struct timespec ts;
19 if (clock_gettime(CLOCK_REALTIME_COARSE, &ts) == -1)
40 struct timespec ts;
42 if (clock_gettime(CLOCK_REALTIME_FAST, &ts) == -1)
57 struct timespec ts;
59 if (clock_gettime(CLOCK_REALTIME, &ts) == -1)
91 struct timespec ts;
114 struct timespec ts;
116 if (clock_gettime(CLOCK_MONOTONIC_FAST, &ts) == -1)
131 struct timespec ts;
[all …]
H A Dthreads135 struct timespec ts;
142 ts.tv_sec = 0;
143 ts.tv_nsec = 0;
144 if (sem_timedwait(&sem, &ts) != 0)