rippled
basic_seconds_clock.h
1 //------------------------------------------------------------------------------
2 /*
3  This file is part of Beast: https://github.com/vinniefalco/Beast
4  Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
5 
6  Permission to use, copy, modify, and/or distribute this software for any
7  purpose with or without fee is hereby granted, provided that the above
8  copyright notice and this permission notice appear in all copies.
9 
10  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18 //==============================================================================
19 
20 #ifndef BEAST_CHRONO_BASIC_SECONDS_CLOCK_H_INCLUDED
21 #define BEAST_CHRONO_BASIC_SECONDS_CLOCK_H_INCLUDED
22 
23 #include <chrono>
24 
25 namespace beast {
26 
37 {
38 public:
40 
41  explicit basic_seconds_clock() = default;
42 
43  using rep = typename Clock::rep;
44  using period = typename Clock::period;
45  using duration = typename Clock::duration;
46  using time_point = typename Clock::time_point;
47 
48  static bool const is_steady = Clock::is_steady;
49 
50  static time_point
51  now();
52 };
53 
54 } // namespace beast
55 
56 #endif
std::chrono::steady_clock
beast::basic_seconds_clock::duration
typename Clock::duration duration
Definition: basic_seconds_clock.h:45
beast::basic_seconds_clock::time_point
typename Clock::time_point time_point
Definition: basic_seconds_clock.h:46
beast::basic_seconds_clock
A clock whose minimum resolution is one second.
Definition: basic_seconds_clock.h:36
chrono
beast::basic_seconds_clock::basic_seconds_clock
basic_seconds_clock()=default
beast::basic_seconds_clock::is_steady
static const bool is_steady
Definition: basic_seconds_clock.h:48
beast::basic_seconds_clock::period
typename Clock::period period
Definition: basic_seconds_clock.h:44
beast::basic_seconds_clock::rep
typename Clock::rep rep
Definition: basic_seconds_clock.h:43
beast
Definition: base_uint.h:641
beast::basic_seconds_clock::now
static time_point now()
Definition: basic_seconds_clock.cpp:100