blob: da9e3290bbb208713b751d6002436a7c91e51e98 [file] [log] [blame]
Howard Hinnantc51e1022010-05-11 19:42:16 +00001// -*- C++ -*-
2//===---------------------------- ctime -----------------------------------===//
3//
Howard Hinnantc566dc32010-05-11 21:36:01 +00004// The LLVM Compiler Infrastructure
Howard Hinnantc51e1022010-05-11 19:42:16 +00005//
Howard Hinnantee11c312010-11-16 22:09:02 +00006// This file is dual licensed under the MIT and the University of Illinois Open
7// Source Licenses. See LICENSE.TXT for details.
Howard Hinnantc51e1022010-05-11 19:42:16 +00008//
9//===----------------------------------------------------------------------===//
10
11#ifndef _LIBCPP_CTIME
12#define _LIBCPP_CTIME
13
14/*
15 ctime synopsis
16
17Macros:
18
19 NULL
20 CLOCKS_PER_SEC
Howard Hinnant3b6579a2010-08-22 00:02:43 +000021
Howard Hinnantc51e1022010-05-11 19:42:16 +000022namespace std
23{
24
25Types:
26
27 clock_t
28 size_t
29 time_t
30 tm
31
32clock_t clock();
33double difftime(time_t time1, time_t time0);
34time_t mktime(tm* timeptr);
35time_t time(time_t* timer);
36char* asctime(const tm* timeptr);
37char* ctime(const time_t* timer);
38tm* gmtime(const time_t* timer);
39tm* localtime(const time_t* timer);
40size_t strftime(char* restrict s, size_t maxsize, const char* restrict format,
41 const tm* restrict timeptr);
42
43} // std
44
45*/
46
47#include <__config>
48#include <time.h>
49
Howard Hinnantaaaa52b2011-10-17 20:05:10 +000050#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Howard Hinnantc51e1022010-05-11 19:42:16 +000051#pragma GCC system_header
Howard Hinnantaaaa52b2011-10-17 20:05:10 +000052#endif
Howard Hinnantc51e1022010-05-11 19:42:16 +000053
54_LIBCPP_BEGIN_NAMESPACE_STD
55
56using ::clock_t;
57using ::size_t;
58using ::time_t;
59using ::tm;
60using ::clock;
61using ::difftime;
62using ::mktime;
63using ::time;
Ed Schouten137c8632015-06-24 08:44:38 +000064#ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
Howard Hinnantc51e1022010-05-11 19:42:16 +000065using ::asctime;
66using ::ctime;
67using ::gmtime;
68using ::localtime;
Ed Schouten137c8632015-06-24 08:44:38 +000069#endif
Howard Hinnantc51e1022010-05-11 19:42:16 +000070using ::strftime;
71
72_LIBCPP_END_NAMESPACE_STD
73
74#endif // _LIBCPP_CTIME