]> granicus.if.org Git - postgresql/blobdiff - src/backend/tcop/postgres.c
Add time/date macros for code clarity:
[postgresql] / src / backend / tcop / postgres.c
index 038a482239f0c4a4dad63da2b60b7ee2bcd6bbb7..ed5f050242091d4c0e7ccf0aa9d080a13c709436 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.453 2005/07/10 21:13:58 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.455 2005/07/21 03:56:11 momjian Exp $
  *
  * NOTES
  *       this is the "main" module of the postgres backend and
@@ -2111,7 +2111,7 @@ authdie(SIGNAL_ARGS)
  * Query-cancel signal from postmaster: abort current transaction
  * at soonest convenient time
  */
-static void
+void
 StatementCancelHandler(SIGNAL_ARGS)
 {
        int                     save_errno = errno;
@@ -3536,10 +3536,10 @@ log_disconnections(int code, Datum arg)
        end.tv_sec -= port->session_start.tv_sec;
        end.tv_usec -= port->session_start.tv_usec;
 
-       hours = end.tv_sec / 3600;
-       end.tv_sec %= 3600;
-       minutes = end.tv_sec / 60;
-       seconds = end.tv_sec % 60;
+       hours = end.tv_sec / SECS_PER_HOUR;
+       end.tv_sec %= SECS_PER_HOUR;
+       minutes = end.tv_sec / SECS_PER_MINUTE;
+       seconds = end.tv_sec % SECS_PER_MINUTE;
 
        /* if time has gone backwards for some reason say so, or print time */