reactos/lib/sdk/crt/time/time.c
Cameron Gutman c2d0d784c7 [USB-BRINGUP-TRUNK]
- Create a branch to do a proper merge of USB work from a trunk base instead of from cmake-bringup
- In the future, DO NOT under any circumstances branch another branch. This leads to merge problems!

svn path=/branches/usb-bringup-trunk/; revision=55018
2012-01-20 20:58:46 +00:00

26 lines
548 B
C

/*
* COPYRIGHT: LGPL, See LGPL.txt in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/sdk/crt/time/time.c
* PURPOSE: Implementation of _time (_time32, _time64)
* PROGRAMER: Timo Kreuzer
*/
#include <precomp.h>
#include <time.h>
#include "bitsfixup.h"
time_t _time(time_t* ptime)
{
FILETIME SystemTime;
time_t time = 0;
GetSystemTimeAsFileTime(&SystemTime);
time = (time_t)FileTimeToUnixTime(&SystemTime, NULL);
if (ptime)
{
*ptime = time;
}
return time;
}