Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/times.cc')
-rw-r--r--winsup/cygwin/times.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index 5e4496308..4c0909eb5 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -255,11 +255,9 @@ to_timestruc_t (FILETIME *ptr, timestruc_t *out)
void __stdcall
time_as_timestruc_t (timestruc_t * out)
{
- SYSTEMTIME systemtime;
FILETIME filetime;
- GetSystemTime (&systemtime);
- SystemTimeToFileTime (&systemtime, &filetime);
+ GetSystemTimeAsFileTime (&filetime);
to_timestruc_t (&filetime, out);
}
@@ -269,11 +267,9 @@ extern "C" time_t
time (time_t * ptr)
{
time_t res;
- SYSTEMTIME systemtime;
FILETIME filetime;
- GetSystemTime (&systemtime);
- SystemTimeToFileTime (&systemtime, &filetime);
+ GetSystemTimeAsFileTime (&filetime);
res = to_time_t (&filetime);
if (ptr)
*ptr = res;