PostgreSQL Source Code git master
|
#include <time.h>
Go to the source code of this file.
Data Structures | |
struct | instr_time |
Macros | |
#define | NS_PER_S INT64CONST(1000000000) |
#define | NS_PER_MS INT64CONST(1000000) |
#define | NS_PER_US INT64CONST(1000) |
#define | PG_INSTR_CLOCK CLOCK_REALTIME |
#define | INSTR_TIME_SET_CURRENT(t) ((t) = pg_clock_gettime_ns()) |
#define | INSTR_TIME_GET_NANOSEC(t) ((int64) (t).ticks) |
#define | INSTR_TIME_IS_ZERO(t) ((t).ticks == 0) |
#define | INSTR_TIME_SET_ZERO(t) ((t).ticks = 0) |
#define | INSTR_TIME_SET_CURRENT_LAZY(t) (INSTR_TIME_IS_ZERO(t) ? INSTR_TIME_SET_CURRENT(t), true : false) |
#define | INSTR_TIME_ADD(x, y) ((x).ticks += (y).ticks) |
#define | INSTR_TIME_SUBTRACT(x, y) ((x).ticks -= (y).ticks) |
#define | INSTR_TIME_ACCUM_DIFF(x, y, z) ((x).ticks += (y).ticks - (z).ticks) |
#define | INSTR_TIME_GET_DOUBLE(t) ((double) INSTR_TIME_GET_NANOSEC(t) / NS_PER_S) |
#define | INSTR_TIME_GET_MILLISEC(t) ((double) INSTR_TIME_GET_NANOSEC(t) / NS_PER_MS) |
#define | INSTR_TIME_GET_MICROSEC(t) (INSTR_TIME_GET_NANOSEC(t) / NS_PER_US) |
Typedefs | |
typedef struct instr_time | instr_time |
Functions | |
static instr_time | pg_clock_gettime_ns (void) |
Definition at line 184 of file instr_time.h.
Definition at line 178 of file instr_time.h.
#define INSTR_TIME_GET_DOUBLE | ( | t | ) | ((double) INSTR_TIME_GET_NANOSEC(t) / NS_PER_S) |
Definition at line 188 of file instr_time.h.
#define INSTR_TIME_GET_MICROSEC | ( | t | ) | (INSTR_TIME_GET_NANOSEC(t) / NS_PER_US) |
Definition at line 194 of file instr_time.h.
#define INSTR_TIME_GET_MILLISEC | ( | t | ) | ((double) INSTR_TIME_GET_NANOSEC(t) / NS_PER_MS) |
Definition at line 191 of file instr_time.h.
#define INSTR_TIME_GET_NANOSEC | ( | t | ) | ((int64) (t).ticks) |
Definition at line 125 of file instr_time.h.
#define INSTR_TIME_IS_ZERO | ( | t | ) | ((t).ticks == 0) |
Definition at line 169 of file instr_time.h.
#define INSTR_TIME_SET_CURRENT | ( | t | ) | ((t) = pg_clock_gettime_ns()) |
Definition at line 122 of file instr_time.h.
#define INSTR_TIME_SET_CURRENT_LAZY | ( | t | ) | (INSTR_TIME_IS_ZERO(t) ? INSTR_TIME_SET_CURRENT(t), true : false) |
Definition at line 174 of file instr_time.h.
#define INSTR_TIME_SET_ZERO | ( | t | ) | ((t).ticks = 0) |
Definition at line 172 of file instr_time.h.
Definition at line 181 of file instr_time.h.
#define NS_PER_MS INT64CONST(1000000) |
Definition at line 78 of file instr_time.h.
#define NS_PER_S INT64CONST(1000000000) |
Definition at line 77 of file instr_time.h.
#define NS_PER_US INT64CONST(1000) |
Definition at line 79 of file instr_time.h.
#define PG_INSTR_CLOCK CLOCK_REALTIME |
Definition at line 106 of file instr_time.h.
typedef struct instr_time instr_time |
|
inlinestatic |
Definition at line 111 of file instr_time.h.
References now(), NS_PER_S, and PG_INSTR_CLOCK.