ReactOS 0.4.16-dev-297-gc569aee
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}
#define _time
Definition: bitsfixup.h:16
#define NULL
Definition: types.h:112
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
Definition: time.c:128
__kernel_time_t time_t
Definition: linux.h:252
__u16 time
Definition: mkdosfs.c:8
static __inline __time64_t FileTimeToUnixTime(const FILETIME *FileTime, USHORT *millitm)
Definition: time.h:14