ReactOS  0.4.15-dev-1177-g6cb3b62
time.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: LGPL, See LGPL.txt in the top level directory
3  * PROJECT: ReactOS system libraries
4  * FILE: lib/sdk/crt/time/time.c
5  * PURPOSE: Implementation of _time (_time32, _time64)
6  * PROGRAMER: Timo Kreuzer
7  */
8 #include <precomp.h>
9 #include <time.h>
10 #include "bitsfixup.h"
11 
13 {
14  FILETIME SystemTime;
15  time_t time = 0;
16 
17  GetSystemTimeAsFileTime(&SystemTime);
18  time = (time_t)FileTimeToUnixTime(&SystemTime, NULL);
19 
20  if (ptime)
21  {
22  *ptime = time;
23  }
24  return time;
25 }
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
Definition: time.c:128
time_t _time(time_t *ptime)
Definition: time.c:12
__u16 time
Definition: mkdosfs.c:366
static __inline __time64_t FileTimeToUnixTime(const FILETIME *FileTime, USHORT *millitm)
Definition: time.h:14
smooth NULL
Definition: ftsmooth.c:416
__kernel_time_t time_t
Definition: linux.h:252