Rizin
unix-like reverse engineering framework and cli tools
nstime.h
Go to the documentation of this file.
1 /******************************************************************************/
2 #ifdef JEMALLOC_H_TYPES
3 
4 typedef struct nstime_s nstime_t;
5 
6 /* Maximum supported number of seconds (~584 years). */
7 #define NSTIME_SEC_MAX KQU(18446744072)
8 
9 #endif /* JEMALLOC_H_TYPES */
10 /******************************************************************************/
11 #ifdef JEMALLOC_H_STRUCTS
12 
13 struct nstime_s {
14  uint64_t ns;
15 };
16 
17 #endif /* JEMALLOC_H_STRUCTS */
18 /******************************************************************************/
19 #ifdef JEMALLOC_H_EXTERNS
20 
21 void nstime_init(nstime_t *time, uint64_t ns);
22 void nstime_init2(nstime_t *time, uint64_t sec, uint64_t nsec);
23 uint64_t nstime_ns(const nstime_t *time);
24 uint64_t nstime_sec(const nstime_t *time);
25 uint64_t nstime_nsec(const nstime_t *time);
26 void nstime_copy(nstime_t *time, const nstime_t *source);
27 int nstime_compare(const nstime_t *a, const nstime_t *b);
28 void nstime_add(nstime_t *time, const nstime_t *addend);
29 void nstime_subtract(nstime_t *time, const nstime_t *subtrahend);
30 void nstime_imultiply(nstime_t *time, uint64_t multiplier);
31 void nstime_idivide(nstime_t *time, uint64_t divisor);
32 uint64_t nstime_divide(const nstime_t *time, const nstime_t *divisor);
33 #ifdef JEMALLOC_JET
34 typedef bool (nstime_monotonic_t)(void);
35 extern nstime_monotonic_t *nstime_monotonic;
36 typedef bool (nstime_update_t)(nstime_t *);
37 extern nstime_update_t *nstime_update;
38 #else
39 bool nstime_monotonic(void);
40 bool nstime_update(nstime_t *time);
41 #endif
42 
43 #endif /* JEMALLOC_H_EXTERNS */
44 /******************************************************************************/
45 #ifdef JEMALLOC_H_INLINES
46 
47 #endif /* JEMALLOC_H_INLINES */
48 /******************************************************************************/
static static fork const void static count static fd const char const char static newpath char char char static envp time
Definition: sflib.h:42
const char * source
Definition: lz4.h:699
#define nstime_idivide
#define nstime_imultiply
#define nstime_init2
#define nstime_update
#define nstime_divide
#define nstime_compare
#define nstime_subtract
#define nstime_sec
#define nstime_init
#define nstime_add
#define nstime_copy
#define nstime_ns
#define nstime_nsec
#define nstime_monotonic
unsigned long uint64_t
Definition: sftypes.h:28
#define b(i)
Definition: sha256.c:42
#define a(i)
Definition: sha256.c:41
#define bool
Definition: sysdefs.h:146