Flesh out time_*() API.
This commit is contained in:
@@ -460,6 +460,18 @@ tcaches_get
|
||||
tcache_stats_merge
|
||||
thread_allocated_cleanup
|
||||
thread_deallocated_cleanup
|
||||
ticker_init
|
||||
ticker_tick
|
||||
time_add
|
||||
time_compare
|
||||
time_copy
|
||||
time_divide
|
||||
time_idivide
|
||||
time_imultiply
|
||||
time_init
|
||||
time_nsec
|
||||
time_sec
|
||||
time_subtract
|
||||
time_update
|
||||
tsd_arena_get
|
||||
tsd_arena_set
|
||||
|
@@ -1,8 +1,11 @@
|
||||
/******************************************************************************/
|
||||
#ifdef JEMALLOC_H_TYPES
|
||||
|
||||
#define JEMALLOC_CLOCK_GETTIME defined(_POSIX_MONOTONIC_CLOCK) \
|
||||
&& _POSIX_MONOTONIC_CLOCK >= 0
|
||||
|
||||
/******************************************************************************/
|
||||
#ifdef JEMALLOC_H_TYPES
|
||||
/* Maximum supported number of seconds (~584 years). */
|
||||
#define TIME_SEC_MAX 18446744072
|
||||
|
||||
#endif /* JEMALLOC_H_TYPES */
|
||||
/******************************************************************************/
|
||||
@@ -12,6 +15,17 @@
|
||||
/******************************************************************************/
|
||||
#ifdef JEMALLOC_H_EXTERNS
|
||||
|
||||
void time_init(struct timespec *time, time_t sec, long nsec);
|
||||
time_t time_sec(const struct timespec *time);
|
||||
long time_nsec(const struct timespec *time);
|
||||
void time_copy(struct timespec *time, const struct timespec *source);
|
||||
int time_compare(const struct timespec *a, const struct timespec *b);
|
||||
void time_add(struct timespec *time, const struct timespec *addend);
|
||||
void time_subtract(struct timespec *time, const struct timespec *subtrahend);
|
||||
void time_imultiply(struct timespec *time, uint64_t multiplier);
|
||||
void time_idivide(struct timespec *time, uint64_t divisor);
|
||||
uint64_t time_divide(const struct timespec *time,
|
||||
const struct timespec *divisor);
|
||||
bool time_update(struct timespec *time);
|
||||
|
||||
#endif /* JEMALLOC_H_EXTERNS */
|
||||
|
Reference in New Issue
Block a user