]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/chrono/stopwatches/include/boost/chrono/stopwatches/collectors/last_lap.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / chrono / stopwatches / include / boost / chrono / stopwatches / collectors / last_lap.hpp
1 // boost/chrono/stopwatches/collectors/last_lap.hpp
2 // Copyright 2011 Vicente J. Botet Escriba
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or
5 // copy at http://www.boost.org/LICENSE_1_0.txt)
6 // See http://www.boost.org/libs/chrono/stopwatches for documentation.
7
8 #ifndef BOOST_CHRONO_STOPWATCHES_MEMORIES_LAST_LAP_HPP
9 #define BOOST_CHRONO_STOPWATCHES_MEMORIES_LAST_LAP_HPP
10
11
12 namespace boost
13 {
14 namespace chrono
15 {
16
17 template<typename Duration>
18 struct last_lap
19 {
20 typedef Duration duration;
21 duration last_;
22 void store(duration const& d)
23 {
24 last_ = d;
25 }
26 void reset()
27 {
28 last_ = duration::zero();
29 }
30 duration last() const { return last_; }
31 duration elapsed() const { return duration::zero(); }
32
33 };
34
35
36 } // namespace chrono
37 } // namespace boost
38
39
40 #endif
41
42