diff options
| author | Jason Evans <jasone@canonware.com> | 2016-02-19 20:35:37 (GMT) |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2016-02-20 04:29:06 (GMT) |
| commit | 94451d184b09fdf57837d0a69ab05ec06317f5ca (patch) | |
| tree | 2c7e1c9bc3dbfc2f793ad2db82c8638a6eccbe2f /include/jemalloc | |
| parent | e5d5a4a51792258aed65e6b45191d1f56c1305ea (diff) | |
| download | jemalloc-94451d184b09fdf57837d0a69ab05ec06317f5ca.zip jemalloc-94451d184b09fdf57837d0a69ab05ec06317f5ca.tar.gz jemalloc-94451d184b09fdf57837d0a69ab05ec06317f5ca.tar.bz2 | |
Flesh out time_*() API.
Diffstat (limited to 'include/jemalloc')
| -rw-r--r-- | include/jemalloc/internal/private_symbols.txt | 12 | ||||
| -rw-r--r-- | include/jemalloc/internal/time.h | 18 |
2 files changed, 28 insertions, 2 deletions
diff --git a/include/jemalloc/internal/private_symbols.txt b/include/jemalloc/internal/private_symbols.txt index 8b1fd45..4c40af6 100644 --- a/include/jemalloc/internal/private_symbols.txt +++ b/include/jemalloc/internal/private_symbols.txt @@ -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 diff --git a/include/jemalloc/internal/time.h b/include/jemalloc/internal/time.h index e3e6c5f..a290f38 100644 --- a/include/jemalloc/internal/time.h +++ b/include/jemalloc/internal/time.h @@ -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 */ |
