brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 1e845a8 Raw
92 lines · plain
1// -*- C++ -*-2//===----------------------------------------------------------------------===//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-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCPP_CTIME11#define _LIBCPP_CTIME12 13/*14    ctime synopsis15 16Macros:17 18    NULL19    CLOCKS_PER_SEC20    TIME_UTC // C++1721 22namespace std23{24 25Types:26 27    clock_t28    size_t29    time_t30    tm31    timespec // C++1732 33clock_t clock();34double difftime(time_t time1, time_t time0);35time_t mktime(tm* timeptr);36time_t time(time_t* timer);37char* asctime(const tm* timeptr);38char* ctime(const time_t* timer);39tm*    gmtime(const time_t* timer);40tm* localtime(const time_t* timer);41size_t strftime(char* restrict s, size_t maxsize, const char* restrict format,42                const tm* restrict timeptr);43int timespec_get( struct timespec *ts, int base); // C++1744}  // std45 46*/47 48#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)49#  include <__cxx03/ctime>50#else51#  include <__config>52#  include <__cstddef/size_t.h>53 54// <time.h> is not provided by libc++55#  if __has_include(<time.h>)56#    include <time.h>57#    ifdef _LIBCPP_TIME_H58#      error "If libc++ starts defining <time.h>, the __has_include check should move to libc++'s <time.h>"59#    endif60#  endif61 62#  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)63#    pragma GCC system_header64#  endif65 66_LIBCPP_BEGIN_NAMESPACE_STD67 68using ::clock_t _LIBCPP_USING_IF_EXISTS;69using ::time_t _LIBCPP_USING_IF_EXISTS;70using ::tm _LIBCPP_USING_IF_EXISTS;71#  if _LIBCPP_STD_VER >= 1772using ::timespec _LIBCPP_USING_IF_EXISTS;73#  endif74using ::clock _LIBCPP_USING_IF_EXISTS;75using ::difftime _LIBCPP_USING_IF_EXISTS;76using ::mktime _LIBCPP_USING_IF_EXISTS;77using ::time _LIBCPP_USING_IF_EXISTS;78using ::asctime _LIBCPP_USING_IF_EXISTS;79using ::ctime _LIBCPP_USING_IF_EXISTS;80using ::gmtime _LIBCPP_USING_IF_EXISTS;81using ::localtime _LIBCPP_USING_IF_EXISTS;82using ::strftime _LIBCPP_USING_IF_EXISTS;83#  if _LIBCPP_STD_VER >= 1784using ::timespec_get _LIBCPP_USING_IF_EXISTS;85#  endif86 87_LIBCPP_END_NAMESPACE_STD88 89#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)90 91#endif // _LIBCPP_CTIME92