• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // UNSUPPORTED: c++03, c++11, c++14, c++17
10 // UNSUPPORTED: c++filesystem-disabled
11 
12 // <chrono>
13 
14 // file_clock
15 
16 // static time_point now() noexcept;
17 
18 #include <chrono>
19 #include <cassert>
20 
21 #include "test_macros.h"
22 
main(int,char **)23 int main(int, char**)
24 {
25     typedef std::chrono::file_clock C;
26     ASSERT_NOEXCEPT(C::now());
27 
28     C::time_point t1 = C::now();
29     assert(t1.time_since_epoch().count() != 0);
30     assert(C::time_point::min() < t1);
31     assert(C::time_point::max() > t1);
32 
33   return 0;
34 }
35