1bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//===----------------------------------------------------------------------===//
2bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//
3f5256e16dfc425c1d466f6308d4026d529ce9e0bHoward Hinnant//                     The LLVM Compiler Infrastructure
4bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//
5b64f8b07c104c6cc986570ac8ee0ed16a9f23976Howard Hinnant// This file is dual licensed under the MIT and the University of Illinois Open
6b64f8b07c104c6cc986570ac8ee0ed16a9f23976Howard Hinnant// Source Licenses. See LICENSE.TXT for details.
7bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//
8bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//===----------------------------------------------------------------------===//
9bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
10bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant// <chrono>
11bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
12bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant// time_point
13bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
14c52f43e72dfcea03037729649da84c23b3beb04aHoward Hinnant// template <class Clock, class Duration1, class Duration2>
15bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//   bool
16bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//   operator< (const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs);
17bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
18c52f43e72dfcea03037729649da84c23b3beb04aHoward Hinnant// template <class Clock, class Duration1, class Duration2>
19bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//   bool
20bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//   operator> (const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs);
21bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
22c52f43e72dfcea03037729649da84c23b3beb04aHoward Hinnant// template <class Clock, class Duration1, class Duration2>
23bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//   bool
24bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//   operator<=(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs);
25bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
26c52f43e72dfcea03037729649da84c23b3beb04aHoward Hinnant// template <class Clock, class Duration1, class Duration2>
27bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//   bool
28bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant//   operator>=(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs);
29bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
30bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant// time_points with different clocks should not compare
31bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
32bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant#include <chrono>
33bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
34bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant#include "../../clock.h"
35bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
36bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnantint main()
37bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant{
38bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    typedef std::chrono::system_clock Clock1;
39bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    typedef Clock                     Clock2;
40bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    typedef std::chrono::milliseconds Duration1;
41bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    typedef std::chrono::microseconds Duration2;
42bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    typedef std::chrono::time_point<Clock1, Duration1> T1;
43bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    typedef std::chrono::time_point<Clock2, Duration2> T2;
44bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant
45bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    T1 t1(Duration1(3));
46bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    T2 t2(Duration2(3000));
47bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant    t1 < t2;
48bc8d3f97eb5c958007f2713238472e0c1c8fe02Howard Hinnant}
49