mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
minor code cleanup - replace useless struct timezone argument to
gettimeofday with NULL in a few places, making it consistent with usage elsewhere.
This commit is contained in:
@ -37,7 +37,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.471 2005/10/20 20:05:44 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.472 2005/10/22 14:27:28 adunstan Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
*
|
*
|
||||||
@ -1148,9 +1148,8 @@ ServerLoop(void)
|
|||||||
last_touch_time;
|
last_touch_time;
|
||||||
struct timeval earlier,
|
struct timeval earlier,
|
||||||
later;
|
later;
|
||||||
struct timezone tz;
|
|
||||||
|
|
||||||
gettimeofday(&earlier, &tz);
|
gettimeofday(&earlier, NULL);
|
||||||
last_touch_time = time(NULL);
|
last_touch_time = time(NULL);
|
||||||
|
|
||||||
nSockets = initMasks(&readmask);
|
nSockets = initMasks(&readmask);
|
||||||
@ -1207,7 +1206,7 @@ ServerLoop(void)
|
|||||||
*/
|
*/
|
||||||
while (random_seed == 0)
|
while (random_seed == 0)
|
||||||
{
|
{
|
||||||
gettimeofday(&later, &tz);
|
gettimeofday(&later, NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We are not sure how much precision is in tv_usec, so we
|
* We are not sure how much precision is in tv_usec, so we
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/adt/nabstime.c,v 1.145 2005/10/15 02:49:29 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/adt/nabstime.c,v 1.146 2005/10/22 14:27:29 adunstan Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1584,14 +1584,13 @@ Datum
|
|||||||
timeofday(PG_FUNCTION_ARGS)
|
timeofday(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
struct timeval tp;
|
struct timeval tp;
|
||||||
struct timezone tpz;
|
|
||||||
char templ[128];
|
char templ[128];
|
||||||
char buf[128];
|
char buf[128];
|
||||||
text *result;
|
text *result;
|
||||||
int len;
|
int len;
|
||||||
pg_time_t tt;
|
pg_time_t tt;
|
||||||
|
|
||||||
gettimeofday(&tp, &tpz);
|
gettimeofday(&tp, NULL);
|
||||||
tt = (pg_time_t) tp.tv_sec;
|
tt = (pg_time_t) tp.tv_sec;
|
||||||
pg_strftime(templ, sizeof(templ), "%a %b %d %H:%M:%S.%%06d %Y %Z",
|
pg_strftime(templ, sizeof(templ), "%a %b %d %H:%M:%S.%%06d %Y %Z",
|
||||||
pg_localtime(&tt, global_timezone));
|
pg_localtime(&tt, global_timezone));
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/misc/pg_rusage.c,v 1.2 2005/10/15 02:49:36 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/misc/pg_rusage.c,v 1.3 2005/10/22 14:27:29 adunstan Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -26,10 +26,8 @@
|
|||||||
void
|
void
|
||||||
pg_rusage_init(PGRUsage *ru0)
|
pg_rusage_init(PGRUsage *ru0)
|
||||||
{
|
{
|
||||||
struct timezone tz;
|
|
||||||
|
|
||||||
getrusage(RUSAGE_SELF, &ru0->ru);
|
getrusage(RUSAGE_SELF, &ru0->ru);
|
||||||
gettimeofday(&ru0->tv, &tz);
|
gettimeofday(&ru0->tv, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user