summaryrefslogtreecommitdiff
path: root/libphobos/libdruntime/core/sys/windows/stdc/time.d
blob: 97eb4bf1e11aac5e1c0c258d0ac1987ce3bbb7fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
 * D header file for C99.
 *
 * $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_time.h.html, _time.h)
 *
 * Copyright: Copyright Sean Kelly 2005 - 2009.
 * License: Distributed under the
 *      $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
 *    (See accompanying file LICENSE)
 * Authors:   Sean Kelly,
 *            Alex Rønne Petersen
 * Source:    $(DRUNTIMESRC core/stdc/_time.d)
 * Standards: ISO/IEC 9899:1999 (E)
 */

module core.sys.windows.stdc.time;

version (Windows):

import core.stdc.config;

extern (C):
@trusted: // There are only a few functions here that use unsafe C strings.
nothrow:
@nogc:

///
struct tm
{
    int     tm_sec;     /// seconds after the minute - [0, 60]
    int     tm_min;     /// minutes after the hour - [0, 59]
    int     tm_hour;    /// hours since midnight - [0, 23]
    int     tm_mday;    /// day of the month - [1, 31]
    int     tm_mon;     /// months since January - [0, 11]
    int     tm_year;    /// years since 1900
    int     tm_wday;    /// days since Sunday - [0, 6]
    int     tm_yday;    /// days since January 1 - [0, 365]
    int     tm_isdst;   /// Daylight Saving Time flag
}

///
alias c_long time_t;
///
alias c_long clock_t;

enum clock_t CLOCKS_PER_SEC = 1000;
clock_t clock();

///
void  tzset();                           // non-standard
///
void  _tzset();                          // non-standard
///
@system char* _strdate(return scope char* s);                 // non-standard
///
@system char* _strtime(return scope char* s);                 // non-standard

///
extern __gshared const(char)*[2] tzname; // non-standard