aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-08-06 14:28:02 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-08-06 14:28:02 +0300
commit3dcb09de7bb21c75d4df48263561af324fd099a4 (patch)
treec0d50a751a2ca32d5ac7d5d9f07354f60298e854
parent8771298605a6d81861634ed387a6fc7ed496fa61 (diff)
downloadpostgresql-3dcb09de7bb21c75d4df48263561af324fd099a4.tar.gz
postgresql-3dcb09de7bb21c75d4df48263561af324fd099a4.zip
Fix comments in instr_time.h and remove an unneeded cast to int64
03023a2664 represented time as an int64 on all platforms but forgot to update the comment related to INSTR_TIME_GET_MICROSEC() and provided an incorrect comment for INSTR_TIME_GET_NANOSEC(). In passing remove an unneeded cast to int64. Author: Bertrand Drouvot Discussion: https://www.postgresql.org/message-id/ZrHkv3MAQfwNSmTG@ip-10-97-1-34.eu-west-3.compute.internal
-rw-r--r--src/include/portability/instr_time.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h
index a6fc1922f20..8f9ba2f151f 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) convert t to uint64 (in microseconds)
+ * INSTR_TIME_GET_MICROSEC(t) get t in microseconds
*
- * INSTR_TIME_GET_NANOSEC(t) convert t to uint64 (in nanoseconds)
+ * INSTR_TIME_GET_NANOSEC(t) get t 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) \
- ((int64) (t).ticks)
+ ((t).ticks)
#else /* WIN32 */