]>
git.proxmox.com Git - rustc.git/blob - src/jemalloc/include/jemalloc/internal/nstime.h
1 /******************************************************************************/
2 #ifdef JEMALLOC_H_TYPES
4 #define JEMALLOC_CLOCK_GETTIME defined(_POSIX_MONOTONIC_CLOCK) \
5 && _POSIX_MONOTONIC_CLOCK >= 0
7 typedef struct nstime_s nstime_t
;
9 /* Maximum supported number of seconds (~584 years). */
10 #define NSTIME_SEC_MAX 18446744072
12 #endif /* JEMALLOC_H_TYPES */
13 /******************************************************************************/
14 #ifdef JEMALLOC_H_STRUCTS
20 #endif /* JEMALLOC_H_STRUCTS */
21 /******************************************************************************/
22 #ifdef JEMALLOC_H_EXTERNS
24 void nstime_init(nstime_t
*time
, uint64_t ns
);
25 void nstime_init2(nstime_t
*time
, uint64_t sec
, uint64_t nsec
);
26 uint64_t nstime_ns(const nstime_t
*time
);
27 uint64_t nstime_sec(const nstime_t
*time
);
28 uint64_t nstime_nsec(const nstime_t
*time
);
29 void nstime_copy(nstime_t
*time
, const nstime_t
*source
);
30 int nstime_compare(const nstime_t
*a
, const nstime_t
*b
);
31 void nstime_add(nstime_t
*time
, const nstime_t
*addend
);
32 void nstime_subtract(nstime_t
*time
, const nstime_t
*subtrahend
);
33 void nstime_imultiply(nstime_t
*time
, uint64_t multiplier
);
34 void nstime_idivide(nstime_t
*time
, uint64_t divisor
);
35 uint64_t nstime_divide(const nstime_t
*time
, const nstime_t
*divisor
);
37 typedef bool (nstime_update_t
)(nstime_t
*);
38 extern nstime_update_t
*nstime_update
;
40 bool nstime_update(nstime_t
*time
);
43 #endif /* JEMALLOC_H_EXTERNS */
44 /******************************************************************************/
45 #ifdef JEMALLOC_H_INLINES
47 #endif /* JEMALLOC_H_INLINES */
48 /******************************************************************************/