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