27 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// <chrono>10 11// duration12 13// template <class ToDuration, class Rep, class Period>14// ToDuration15// duration_cast(const duration<Rep, Period>& d);16 17// ToDuration shall be an instantiation of duration.18 19#include <chrono>20 21int main(int, char**)22{23 std::chrono::duration_cast<int>(std::chrono::milliseconds(3));24 25 return 0;26}27