diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-03-20 03:34:57 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-03-20 03:34:57 +0000 |
commit | a18331004a15c4e37fe88312bd882b49edb8228f (patch) | |
tree | 40ce63073108d5823958c460bc7698fb97423428 /src/backend/utils/adt/nabstime.c | |
parent | ddd50a0babd9a8ae478eee607108b7ed5675571d (diff) | |
download | postgresql-a18331004a15c4e37fe88312bd882b49edb8228f.tar.gz postgresql-a18331004a15c4e37fe88312bd882b49edb8228f.zip |
Add start time to pg_stat_activity
Neil Conway
Diffstat (limited to 'src/backend/utils/adt/nabstime.c')
-rw-r--r-- | src/backend/utils/adt/nabstime.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c index 408b1ee14dd..8a75bdffbee 100644 --- a/src/backend/utils/adt/nabstime.c +++ b/src/backend/utils/adt/nabstime.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.104 2003/02/22 05:57:45 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.105 2003/03/20 03:34:56 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -82,10 +82,13 @@ static int istinterval(char *i_string, AbsoluteTime *i_end); -/* GetCurrentAbsoluteTime() - * Get the current system time. +/* + * GetCurrentAbsoluteTime() + * + * Get the current system time. Set timezone parameters if not specified + * elsewhere. Define HasCTZSet to allow clients to specify the default + * timezone. * - * Returns the number of seconds since epoch (January 1 1970 GMT). */ AbsoluteTime GetCurrentAbsoluteTime(void) @@ -127,9 +130,14 @@ GetCurrentDateTime(struct tm * tm) abstime2tm(GetCurrentTransactionStartTime(), &tz, tm, NULL); } -/* GetCurrentTimeUsec() - * Get the transaction start time ("now()") broken down as a struct tm, - * plus fractional-second and timezone info. +/* + * GetCurrentAbsoluteTimeUsec() + * + * Get the current system time. Set timezone parameters if not specified + * elsewhere. Define HasCTZSet to allow clients to specify the default + * timezone. + * + * Returns the number of seconds since epoch (January 1 1970 GMT) */ void GetCurrentTimeUsec(struct tm * tm, fsec_t *fsec, int *tzp) |