comparison libcxx/include/ctime @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 2e18cbf3894f
comparison
equal deleted inserted replaced
147:c2174574ed3a 150:1d019706d866
1 // -*- C++ -*-
2 //===---------------------------- ctime -----------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef _LIBCPP_CTIME
11 #define _LIBCPP_CTIME
12
13 /*
14 ctime synopsis
15
16 Macros:
17
18 NULL
19 CLOCKS_PER_SEC
20 TIME_UTC // C++17
21
22 namespace std
23 {
24
25 Types:
26
27 clock_t
28 size_t
29 time_t
30 tm
31 timespec // C++17
32
33 clock_t clock();
34 double difftime(time_t time1, time_t time0);
35 time_t mktime(tm* timeptr);
36 time_t time(time_t* timer);
37 char* asctime(const tm* timeptr);
38 char* ctime(const time_t* timer);
39 tm* gmtime(const time_t* timer);
40 tm* localtime(const time_t* timer);
41 size_t strftime(char* restrict s, size_t maxsize, const char* restrict format,
42 const tm* restrict timeptr);
43 int timespec_get( struct timespec *ts, int base); // C++17
44 } // std
45
46 */
47
48 #include <__config>
49 #include <time.h>
50
51 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
52 #pragma GCC system_header
53 #endif
54
55 _LIBCPP_BEGIN_NAMESPACE_STD
56
57 using ::clock_t;
58 using ::size_t;
59 using ::time_t;
60 using ::tm;
61 #if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_TIMESPEC_GET)
62 using ::timespec;
63 #endif
64 using ::clock;
65 using ::difftime;
66 using ::mktime;
67 using ::time;
68 #ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
69 using ::asctime;
70 using ::ctime;
71 using ::gmtime;
72 using ::localtime;
73 #endif
74 using ::strftime;
75 #if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_TIMESPEC_GET)
76 using ::timespec_get;
77 #endif
78
79 _LIBCPP_END_NAMESPACE_STD
80
81 #endif // _LIBCPP_CTIME