1 #ifndef __EVIL_TIME_H__
2 #define __EVIL_TIME_H__
3 
4 
5 #include <time.h>
6 
7 
8 /**
9  * @file evil_time.h
10  * @brief The file that provides functions ported from Unix in time.h.
11  * @defgroup Evil_Time_Group Time.h functions
12  * @ingroup Evil
13  *
14  * This header provides functions ported from Unix in time.h.
15  *
16  * @{
17  */
18 
19 #ifdef _MSC_VER
20 struct timezone
21 {
22   int tz_minuteswest; /* of Greenwich */
23   int tz_dsttime;     /* type of dst correction to apply */
24 };
25 #endif
26 
27 /**
28  * @brief Get time and timezone.
29  *
30  * @param tv A pointer that contains two sockets.
31  * @param tz A pointer that contains two sockets.
32  * @return 0 on success, -1 otherwise.
33  *
34  * This function gets the time and timezone. @p tv and @p tz can be
35  * @c NULL. It calls GetSystemTimePreciseAsFileTime() on Windows 8or
36  * above if _WIN32_WINNT is correctly defined. It returns 0 on
37  * success, -1 otherwise.
38  *
39  * @since 1.25
40  */
41 EAPI int evil_gettimeofday(struct timeval *tv, struct timezone *tz);
42 #ifndef HAVE_GETTIMEOFDAY
43 # define HAVE_GETTIMEOFDAY 1
44 #endif
45 
46 
47 /**
48  * @brief Convert a string representation of time to a time tm structure .
49  *
50  * @param buf The string to convert.
51  * @param fmt The representation of time.
52  * @param tm The time tm structure.
53  * @return The first character not processed in this function call.
54  *
55  * This function converts the string @p s to a time tm structure and
56  * fill the buffer @p tm. The format of the time is specified by
57  * @p format. On success, this function returns the first character
58  * not processed in this function call, @c NULL otherwise.
59  *
60  * Conformity: Non applicable.
61  *
62  * Supported OS: Windows XP.
63  */
64 EAPI char *strptime(const char *buf, const char *fmt, struct tm *tm);
65 
66 
67 /**
68  * @}
69  */
70 
71 
72 #endif /* __EVIL_TIME_H__ */
73