|
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_ADD_NANOSEC(t, n) ((t).ticks += (n)) |
| #define | INSTR_TIME_IS_ZERO(t) ((t).ticks == 0) |
| #define | INSTR_TIME_SET_ZERO(t) ((t).ticks = 0) |
| #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_GT(x, y) ((x).ticks > (y).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 188 of file instr_time.h.
Definition at line 182 of file instr_time.h.
| #define INSTR_TIME_ADD_NANOSEC | ( | t, | |
| n | |||
| ) | ((t).ticks += (n)) |
Definition at line 130 of file instr_time.h.
| #define INSTR_TIME_GET_DOUBLE | ( | t | ) | ((double) INSTR_TIME_GET_NANOSEC(t) / NS_PER_S) |
Definition at line 194 of file instr_time.h.
| #define INSTR_TIME_GET_MICROSEC | ( | t | ) | (INSTR_TIME_GET_NANOSEC(t) / NS_PER_US) |
Definition at line 200 of file instr_time.h.
| #define INSTR_TIME_GET_MILLISEC | ( | t | ) | ((double) INSTR_TIME_GET_NANOSEC(t) / NS_PER_MS) |
Definition at line 197 of file instr_time.h.
Definition at line 127 of file instr_time.h.
| #define INSTR_TIME_IS_ZERO | ( | t | ) | ((t).ticks == 0) |
Definition at line 177 of file instr_time.h.
| #define INSTR_TIME_SET_CURRENT | ( | t | ) | ((t) = pg_clock_gettime_ns()) |
Definition at line 124 of file instr_time.h.
| #define INSTR_TIME_SET_ZERO | ( | t | ) | ((t).ticks = 0) |
Definition at line 179 of file instr_time.h.
Definition at line 185 of file instr_time.h.
| #define NS_PER_MS INT64CONST(1000000) |
Definition at line 80 of file instr_time.h.
| #define NS_PER_S INT64CONST(1000000000) |
Definition at line 79 of file instr_time.h.
| #define NS_PER_US INT64CONST(1000) |
Definition at line 81 of file instr_time.h.
| #define PG_INSTR_CLOCK CLOCK_REALTIME |
Definition at line 108 of file instr_time.h.
| typedef struct instr_time instr_time |
|
inlinestatic |
Definition at line 113 of file instr_time.h.
References fb(), now(), NS_PER_S, and PG_INSTR_CLOCK.