nxt_thread_time.h (223:bf98efe2c55c) nxt_thread_time.h (2084:7d479274f334)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#ifndef _NXT_THREAD_TIME_H_INCLUDED_
8#define _NXT_THREAD_TIME_H_INCLUDED_

--- 56 unchanged lines hidden (view full) ---

65void nxt_thread_time_free(nxt_thread_t *thr);
66NXT_EXPORT nxt_time_t nxt_thread_time(nxt_thread_t *thr);
67NXT_EXPORT nxt_realtime_t *nxt_thread_realtime(nxt_thread_t *thr);
68NXT_EXPORT u_char *nxt_thread_time_string(nxt_thread_t *thr,
69 nxt_time_string_t *ts, u_char *buf);
70void nxt_time_thread_start(nxt_msec_t interval);
71
72
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#ifndef _NXT_THREAD_TIME_H_INCLUDED_
8#define _NXT_THREAD_TIME_H_INCLUDED_

--- 56 unchanged lines hidden (view full) ---

65void nxt_thread_time_free(nxt_thread_t *thr);
66NXT_EXPORT nxt_time_t nxt_thread_time(nxt_thread_t *thr);
67NXT_EXPORT nxt_realtime_t *nxt_thread_realtime(nxt_thread_t *thr);
68NXT_EXPORT u_char *nxt_thread_time_string(nxt_thread_t *thr,
69 nxt_time_string_t *ts, u_char *buf);
70void nxt_time_thread_start(nxt_msec_t interval);
71
72
73#define \
74nxt_thread_monotonic_time(thr) \
73#define nxt_thread_monotonic_time(thr) \
75 (thr)->time.now.monotonic
76
77
78#if (NXT_DEBUG)
79
74 (thr)->time.now.monotonic
75
76
77#if (NXT_DEBUG)
78
80#define \
81nxt_thread_time_debug_update(thr) \
79#define nxt_thread_time_debug_update(thr) \
82 nxt_thread_time_update(thr)
83
84#else
85
80 nxt_thread_time_update(thr)
81
82#else
83
86#define \
87nxt_thread_time_debug_update(thr)
84#define nxt_thread_time_debug_update(thr)
88
89#endif
90
91
92NXT_EXPORT void nxt_gmtime(nxt_time_t s, struct tm *tm);
93
94
95#endif /* _NXT_THREAD_TIME_H_INCLUDED_ */
85
86#endif
87
88
89NXT_EXPORT void nxt_gmtime(nxt_time_t s, struct tm *tm);
90
91
92#endif /* _NXT_THREAD_TIME_H_INCLUDED_ */