server-skynet-source-3rd-je.../include/jemalloc/internal/time.h

42 lines
1.6 KiB
C
Raw Normal View History

2016-02-20 04:35:37 +08:00
/******************************************************************************/
#ifdef JEMALLOC_H_TYPES
2016-02-03 13:52:08 +08:00
#define JEMALLOC_CLOCK_GETTIME defined(_POSIX_MONOTONIC_CLOCK) \
&& _POSIX_MONOTONIC_CLOCK >= 0
2016-02-20 04:35:37 +08:00
/* Maximum supported number of seconds (~584 years). */
#define TIME_SEC_MAX 18446744072
2016-02-03 13:52:08 +08:00
#endif /* JEMALLOC_H_TYPES */
/******************************************************************************/
#ifdef JEMALLOC_H_STRUCTS
#endif /* JEMALLOC_H_STRUCTS */
/******************************************************************************/
#ifdef JEMALLOC_H_EXTERNS
2016-02-20 04:35:37 +08:00
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);
#ifdef JEMALLOC_JET
typedef bool (time_update_t)(struct timespec *);
extern time_update_t *time_update;
#else
2016-02-03 13:52:08 +08:00
bool time_update(struct timespec *time);
#endif
2016-02-03 13:52:08 +08:00
#endif /* JEMALLOC_H_EXTERNS */
/******************************************************************************/
#ifdef JEMALLOC_H_INLINES
#endif /* JEMALLOC_H_INLINES */
/******************************************************************************/