aboutsummaryrefslogtreecommitdiff
path: root/test/std/utilities/time/time.clock/time.clock.system/to_time_t.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/utilities/time/time.clock/time.clock.system/to_time_t.pass.cpp')
-rw-r--r--test/std/utilities/time/time.clock/time.clock.system/to_time_t.pass.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/std/utilities/time/time.clock/time.clock.system/to_time_t.pass.cpp b/test/std/utilities/time/time.clock/time.clock.system/to_time_t.pass.cpp
new file mode 100644
index 000000000000..c4028063bc53
--- /dev/null
+++ b/test/std/utilities/time/time.clock/time.clock.system/to_time_t.pass.cpp
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <chrono>
+
+// system_clock
+
+// time_t to_time_t(const time_point& t);
+
+#include <chrono>
+#include <ctime>
+
+int main()
+{
+ typedef std::chrono::system_clock C;
+ std::time_t t1 = C::to_time_t(C::now());
+ ((void)t1);
+}