1/******************************************************************************/
2#ifdef JEMALLOC_H_TYPES
3
4typedef struct nstime_s nstime_t;
5
6/* Maximum supported number of seconds (~584 years). */
7#define	NSTIME_SEC_MAX	KQU(18446744072)
8
9#endif /* JEMALLOC_H_TYPES */
10/******************************************************************************/
11#ifdef JEMALLOC_H_STRUCTS
12
13struct nstime_s {
14	uint64_t	ns;
15};
16
17#endif /* JEMALLOC_H_STRUCTS */
18/******************************************************************************/
19#ifdef JEMALLOC_H_EXTERNS
20
21void	nstime_init(nstime_t *time, uint64_t ns);
22void	nstime_init2(nstime_t *time, uint64_t sec, uint64_t nsec);
23uint64_t	nstime_ns(const nstime_t *time);
24uint64_t	nstime_sec(const nstime_t *time);
25uint64_t	nstime_nsec(const nstime_t *time);
26void	nstime_copy(nstime_t *time, const nstime_t *source);
27int	nstime_compare(const nstime_t *a, const nstime_t *b);
28void	nstime_add(nstime_t *time, const nstime_t *addend);
29void	nstime_subtract(nstime_t *time, const nstime_t *subtrahend);
30void	nstime_imultiply(nstime_t *time, uint64_t multiplier);
31void	nstime_idivide(nstime_t *time, uint64_t divisor);
32uint64_t	nstime_divide(const nstime_t *time, const nstime_t *divisor);
33#ifdef JEMALLOC_JET
34typedef bool (nstime_monotonic_t)(void);
35extern nstime_monotonic_t *nstime_monotonic;
36typedef bool (nstime_update_t)(nstime_t *);
37extern nstime_update_t *nstime_update;
38#else
39bool	nstime_monotonic(void);
40bool	nstime_update(nstime_t *time);
41#endif
42
43#endif /* JEMALLOC_H_EXTERNS */
44/******************************************************************************/
45#ifdef JEMALLOC_H_INLINES
46
47#endif /* JEMALLOC_H_INLINES */
48/******************************************************************************/
49