diff options
author | Heikki Linnakangas | 2024-08-06 19:15:46 +0000 |
---|---|---|
committer | Heikki Linnakangas | 2024-08-06 19:15:46 +0000 |
commit | 39a138fbef87803ab7fe494243c1ba36a093a0e8 (patch) | |
tree | 5ce28ede5c38808a082a184138e7da4e30eec24b /src | |
parent | 6e086fa2e771ad4c0b2d3cca4e2de209a92c719b (diff) |
Revert "Fix comments in instr_time.h and remove an unneeded cast to int64"
This reverts commit 3dcb09de7b. Tom Lane pointed out that it broke the
abstraction provided by the macros. The callers should not need to
know what the internal type is.
This commit is an exact revert, the next commit will fix the comments
on the macros that incorrectly claim that they return uint64.
Discussion: https://www.postgresql.org/message-id/[email protected]
Diffstat (limited to 'src')
-rw-r--r-- | src/include/portability/instr_time.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h index 8f9ba2f151f..a6fc1922f20 100644 --- a/src/include/portability/instr_time.h +++ b/src/include/portability/instr_time.h @@ -32,9 +32,9 @@ * * INSTR_TIME_GET_MILLISEC(t) convert t to double (in milliseconds) * - * INSTR_TIME_GET_MICROSEC(t) get t in microseconds + * INSTR_TIME_GET_MICROSEC(t) convert t to uint64 (in microseconds) * - * INSTR_TIME_GET_NANOSEC(t) get t in nanoseconds + * INSTR_TIME_GET_NANOSEC(t) convert t to uint64 (in nanoseconds) * * Note that INSTR_TIME_SUBTRACT and INSTR_TIME_ACCUM_DIFF convert * absolute times to intervals. The INSTR_TIME_GET_xxx operations are @@ -123,7 +123,7 @@ pg_clock_gettime_ns(void) ((t) = pg_clock_gettime_ns()) #define INSTR_TIME_GET_NANOSEC(t) \ - ((t).ticks) + ((int64) (t).ticks) #else /* WIN32 */ |