The OpenD Programming Language

1 /**
2  * D header file for C99.
3  *
4  * $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_time.h.html, _time.h)
5  *
6  * Copyright: Copyright Sean Kelly 2005 - 2009.
7  * License: Distributed under the
8  *      $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
9  *    (See accompanying file LICENSE)
10  * Authors:   Sean Kelly,
11  *            Alex Rønne Petersen
12  * Source:    $(DRUNTIMESRC core/stdc/_time.d)
13  * Standards: ISO/IEC 9899:1999 (E)
14  */
15 
16 module core.sys.windows.stdc.time;
17 
18 version (Windows):
19 
20 import core.stdc.config;
21 
22 extern (C):
23 @trusted: // There are only a few functions here that use unsafe C strings.
24 nothrow:
25 @nogc:
26 
27 ///
28 struct tm
29 {
30     int     tm_sec;     /// seconds after the minute - [0, 60]
31     int     tm_min;     /// minutes after the hour - [0, 59]
32     int     tm_hour;    /// hours since midnight - [0, 23]
33     int     tm_mday;    /// day of the month - [1, 31]
34     int     tm_mon;     /// months since January - [0, 11]
35     int     tm_year;    /// years since 1900
36     int     tm_wday;    /// days since Sunday - [0, 6]
37     int     tm_yday;    /// days since January 1 - [0, 365]
38     int     tm_isdst;   /// Daylight Saving Time flag
39 }
40 
41 ///
42 alias c_long time_t;
43 ///
44 alias c_long clock_t;
45 
46 enum clock_t CLOCKS_PER_SEC = 1000;
47 clock_t clock();
48 
49 ///
50 void  tzset();                           // non-standard
51 ///
52 void  _tzset();                          // non-standard
53 ///
54 @system char* _strdate(return scope char* s);                 // non-standard
55 ///
56 @system char* _strtime(return scope char* s);                 // non-standard
57 
58 ///
59 extern __gshared const(char)*[2] tzname; // non-standard