diff options
Diffstat (limited to 'src/include/utils/timestamp.h')
-rw-r--r-- | src/include/utils/timestamp.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h index 4e9e0c3f6f7..47832c8b3fc 100644 --- a/src/include/utils/timestamp.h +++ b/src/include/utils/timestamp.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.60 2006/04/25 00:25:22 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.61 2006/06/20 22:52:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -177,6 +177,12 @@ typedef double fsec_t; #define INTERVAL_PRECISION(t) ((t) & INTERVAL_PRECISION_MASK) #define INTERVAL_RANGE(t) (((t) >> 16) & INTERVAL_RANGE_MASK) +#ifdef HAVE_INT64_TIMESTAMP +#define TimestampTzPlusMilliseconds(tz,ms) ((tz) + ((ms) * 1000)) +#else +#define TimestampTzPlusMilliseconds(tz,ms) ((tz) + ((ms) / 1000.0)) +#endif + /* Set at postmaster start */ extern TimestampTz PgStartTime; @@ -293,7 +299,11 @@ extern Datum pgsql_postmaster_start_time(PG_FUNCTION_ARGS); extern TimestampTz GetCurrentTimestamp(void); +extern void TimestampDifference(TimestampTz start_time, TimestampTz stop_time, + long *secs, int *microsecs); + extern TimestampTz time_t_to_timestamptz(time_t tm); +extern time_t timestamptz_to_time_t(TimestampTz t); extern int tm2timestamp(struct pg_tm * tm, fsec_t fsec, int *tzp, Timestamp *dt); extern int timestamp2tm(Timestamp dt, int *tzp, struct pg_tm * tm, |