mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-06 03:37:33 +03:00
Refactor time_* into nstime_*.
Use a single uint64_t in nstime_t to store nanoseconds rather than using struct timespec. This reduces fragility around conversions between long and uint64_t, especially missing casts that only cause problems on 32-bit platforms.
This commit is contained in:
parent
788d29d397
commit
9bad079039
17 changed files with 526 additions and 557 deletions
|
|
@ -94,7 +94,7 @@
|
|||
# define JEMALLOC_H_STRUCTS
|
||||
# define JEMALLOC_H_EXTERNS
|
||||
# define JEMALLOC_H_INLINES
|
||||
# include "jemalloc/internal/time.h"
|
||||
# include "jemalloc/internal/nstime.h"
|
||||
# include "jemalloc/internal/util.h"
|
||||
# include "jemalloc/internal/qr.h"
|
||||
# include "jemalloc/internal/ql.h"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
#include <sys/time.h>
|
||||
|
||||
typedef struct {
|
||||
struct timespec t0;
|
||||
struct timespec t1;
|
||||
nstime_t t0;
|
||||
nstime_t t1;
|
||||
} timedelta_t;
|
||||
|
||||
void timer_start(timedelta_t *timer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue