Leosac  0.8.0
Open Source Access Control
ElapsedTimeCounter.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014-2016 Leosac
3 
4  This file is part of Leosac.
5 
6  Leosac is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Affero General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Leosac is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Affero General Public License for more details.
15 
16  You should have received a copy of the GNU Affero General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #pragma once
21 
22 #include <chrono>
23 
24 namespace Leosac
25 {
26 
27 namespace Tools
28 {
29 
37 {
38  public:
40 
45  size_t elapsed() const;
46 
47  private:
48  using TimePoint = std::chrono::steady_clock::time_point;
49 
51 };
52 }
53 }
Leosac::Tools::ElapsedTimeCounter::elapsed
size_t elapsed() const
Returns the elapsed time, in milliseconds, since the creation of the ElapsedTimeCounter object.
Definition: ElapsedTimeCounter.cpp:30
Leosac::Tools::ElapsedTimeCounter
This class provide a simple to get the elapsed time since it's creation.
Definition: ElapsedTimeCounter.hpp:36
Leosac::Tools::ElapsedTimeCounter::TimePoint
std::chrono::steady_clock::time_point TimePoint
Definition: ElapsedTimeCounter.hpp:48
Leosac::Tools::ElapsedTimeCounter::creation_
TimePoint creation_
Definition: ElapsedTimeCounter.hpp:50
Leosac::Tools::ElapsedTimeCounter::ElapsedTimeCounter
ElapsedTimeCounter()
Definition: ElapsedTimeCounter.cpp:25
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition: APIStatusCode.hpp:22