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