VPTissue Reference Manual
Timeable.h
Go to the documentation of this file.
1 #ifndef UTIL_CLOCK_MAN_TIMEABLE_H_INCLUDED
2 #define UTIL_CLOCK_MAN_TIMEABLE_H_INCLUDED
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they
7  * will be approved by the European Commission - subsequent
8  * versions of the EUPL (the "Licence");
9  * You may not use this work except in compliance with the
10  * Licence. You may obtain a copy of the Licence at:
11  *
12  * http://ec.europa.eu/idabc/eupl5
13  *
14  * Unless required by applicable law or agreed to in
15  * writing, software distributed under the Licence is
16  * distributed on an "AS IS" basis,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
18  * express or implied.
19  * See the Licence for the specific language governing
20  * permissions and limitations under the Licence.
21  */
27 #include "ClockTraits.h"
28 
29 #include <chrono>
30 
31 namespace SimPT_Sim {
32 namespace ClockMan {
33 
37 template<typename C = std::chrono::system_clock, typename D = typename C::duration>
38 class Timeable : public ClockTraits<C, D>
39 {
40 public:
41  using Timings = typename ClockTraits<C, D>::CumulativeTimings;
42 
43 public:
45  virtual ~Timeable() {}
46 
48  virtual Timings GetTimings() const = 0;
49 };
50 
51 } // namespace
52 } // namespace
53 
54 #endif // end-of-include-guard
Interface for ClockTraits.
Types related to timekeeping.
Definition: ClockTraits.h:36
Utility class to record durations in a cumulative manner.
Namespace for the core simulator.
virtual Timings GetTimings() const =0
Timings in duration units specified above.
virtual ~Timeable()
Destructor virtual for polymorphic class.
Definition: Timeable.h:45
Utility class to for timing.
Definition: Timeable.h:38