Merge "Make GlyphBufferData as another class" into devel/master
[platform/core/uifw/dali-adaptor.git] / third-party / windows-platform / sys / time.h
1 #ifndef TIME_INCLUDE
2 #define TIME_INCLUDE
3
4 #include <time.h>
5 #include <windows.h>
6 #include <winsock.h>
7
8 #undef OPAQUE
9 #undef TRANSPARENT
10
11 #undef ERROR
12
13 #undef TRUE
14 #undef FALSE
15
16 static int gettimeofday( struct timeval *tp, void *tzp )
17 {
18   time_t clock;
19   struct tm tm;
20   SYSTEMTIME wtm;
21   GetLocalTime( &wtm );
22   tm.tm_year = wtm.wYear - 1900;
23   tm.tm_mon = wtm.wMonth - 1;
24   tm.tm_mday = wtm.wDay;
25   tm.tm_hour = wtm.wHour;
26   tm.tm_min = wtm.wMinute;
27   tm.tm_sec = wtm.wSecond;
28   tm.tm_isdst = -1;
29   clock = mktime( &tm );
30   tp->tv_sec = clock;
31   tp->tv_usec = wtm.wMilliseconds * 1000;
32   return ( 0 );
33 }
34
35 #endif