Update crt headers and mingw lib from mingw64. Update crt a bit. 4 msvcrt time tests...
[reactos.git] / reactos / lib / sdk / crt / time / ftime.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/msvcrt/time/ftime.c
5 * PURPOSE: Deprecated BSD library call
6 * PROGRAMER: Art Yerkes
7 * UPDATE HISTORY:
8 * 07/15/03 -- Created
9 */
10
11 #include <precomp.h>
12 #include <sys/timeb.h>
13
14 /* ftime (3) -- Obsolete BSD library function included in the SUS for copat.
15 * Also present in msvcrt.dll as _ftime
16 * See: http://www.opengroup.org/onlinepubs/007904957/functions/ftime.html */
17 /*
18 * @implemented
19 */
20 #undef _ftime
21 void _ftime( struct _timeb *tm )
22 {
23 int ret = 0;
24 SYSTEMTIME syst;
25
26 GetSystemTime( &syst );
27
28 if( ret == 0 ) {
29 time( &tm->time );
30 tm->millitm = syst.wMilliseconds;
31 // tm->_timezone = 0; /* According to the open group, timezone and dstflag */
32 tm->dstflag = 0; /* exist for compatibility, but are unspecified. */
33 }
34 }