mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
pgindent run.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Header: /cvsroot/pgsql/src/port/gettimeofday.c,v 1.1 2003/05/16 04:59:24 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/port/gettimeofday.c,v 1.2 2003/08/04 00:43:33 momjian Exp $
|
||||
*
|
||||
* Copyright (c) 2003 SRA, Inc.
|
||||
* Copyright (c) 2003 SKC, Inc.
|
||||
@@ -34,20 +34,19 @@ static const unsigned __int64 epoch = 116444736000000000L;
|
||||
* timezone information is stored outside the kernel so tzp isn't used anymore.
|
||||
*/
|
||||
int
|
||||
gettimeofday(struct timeval *tp, struct timezone *tzp)
|
||||
gettimeofday(struct timeval * tp, struct timezone * tzp)
|
||||
{
|
||||
FILETIME file_time;
|
||||
SYSTEMTIME system_time;
|
||||
ULARGE_INTEGER ularge;
|
||||
FILETIME file_time;
|
||||
SYSTEMTIME system_time;
|
||||
ULARGE_INTEGER ularge;
|
||||
|
||||
GetSystemTime(&system_time);
|
||||
SystemTimeToFileTime(&system_time, &file_time);
|
||||
ularge.LowPart = file_time.dwLowDateTime;
|
||||
ularge.HighPart = file_time.dwHighDateTime;
|
||||
|
||||
tp->tv_sec = (long)((ularge.QuadPart - epoch) / 10000000L);
|
||||
tp->tv_usec = (long)(system_time.wMilliseconds * 1000);
|
||||
tp->tv_sec = (long) ((ularge.QuadPart - epoch) / 10000000L);
|
||||
tp->tv_usec = (long) (system_time.wMilliseconds * 1000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user