34 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++14, c++1710 11// <chrono>12 13// file_clock14 15// static time_point now() noexcept;16 17#include <chrono>18#include <cassert>19 20#include "test_macros.h"21 22int main(int, char**)23{24 typedef std::chrono::file_clock C;25 ASSERT_NOEXCEPT(C::now());26 27 C::time_point t1 = C::now();28 assert(t1.time_since_epoch().count() != 0);29 assert(C::time_point::min() < t1);30 assert(C::time_point::max() > t1);31 32 return 0;33}34