Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-03 08:13:25

0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef _LIBCPP___CXX03___CHRONO_SYSTEM_CLOCK_H
0011 #define _LIBCPP___CXX03___CHRONO_SYSTEM_CLOCK_H
0012 
0013 #include <__cxx03/__chrono/duration.h>
0014 #include <__cxx03/__chrono/time_point.h>
0015 #include <__cxx03/__config>
0016 #include <__cxx03/ctime>
0017 
0018 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0019 #  pragma GCC system_header
0020 #endif
0021 
0022 _LIBCPP_BEGIN_NAMESPACE_STD
0023 
0024 namespace chrono {
0025 
0026 class _LIBCPP_EXPORTED_FROM_ABI system_clock {
0027 public:
0028   typedef microseconds duration;
0029   typedef duration::rep rep;
0030   typedef duration::period period;
0031   typedef chrono::time_point<system_clock> time_point;
0032   static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = false;
0033 
0034   static time_point now() _NOEXCEPT;
0035   static time_t to_time_t(const time_point& __t) _NOEXCEPT;
0036   static time_point from_time_t(time_t __t) _NOEXCEPT;
0037 };
0038 
0039 #if _LIBCPP_STD_VER >= 20
0040 
0041 template <class _Duration>
0042 using sys_time    = time_point<system_clock, _Duration>;
0043 using sys_seconds = sys_time<seconds>;
0044 using sys_days    = sys_time<days>;
0045 
0046 #endif
0047 
0048 } // namespace chrono
0049 
0050 _LIBCPP_END_NAMESPACE_STD
0051 
0052 #endif // _LIBCPP___CXX03___CHRONO_SYSTEM_CLOCK_H