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: no-filesystem
11 
12 // Filesystem is supported on Apple platforms starting with macosx10.15.
13 // UNSUPPORTED: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14}}
14 
15 // <chrono>
16 
17 // file_clock
18 
19 // static time_point now() noexcept;
20 
21 #include <chrono>
22 #include <cassert>
23 
24 #include "test_macros.h"
25 
main(int,char **)26 int main(int, char**)
27 {
28     typedef std::chrono::file_clock C;
29     ASSERT_NOEXCEPT(C::now());
30 
31     C::time_point t1 = C::now();
32     assert(t1.time_since_epoch().count() != 0);
33     assert(C::time_point::min() < t1);
34     assert(C::time_point::max() > t1);
35 
36   return 0;
37 }
38