OTest2
A C++ testing framework
include
otest2
timesourcesys.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2020 Ondrej Starek
3
*
4
* This file is part of OTest2.
5
*
6
* OTest2 is free software: you can redistribute it and/or modify it under
7
* the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation, either version 3 of the License,
9
* or (at your option) any later version.
10
*
11
* OTest2 is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14
* License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with OTest2. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef OTest2__INCLUDE_OTEST2_TIMESOURCESYS_H_
21
#define OTest2__INCLUDE_OTEST2_TIMESOURCESYS_H_
22
23
#include <
otest2/timesource.h
>
24
25
namespace
OTest2
{
26
30
class
TimeSourceSys
:
public
TimeSource
{
31
public
:
35
TimeSourceSys
();
36
40
virtual
~TimeSourceSys
();
41
42
/* -- avoid copying */
43
TimeSourceSys
(
44
const
TimeSourceSys
&) =
delete
;
45
TimeSourceSys
&
operator =
(
46
const
TimeSourceSys
&) =
delete
;
47
48
/* -- time source interface */
49
virtual
time_point
now
()
override
;
50
};
51
52
}
/* -- namespace OTest2 */
53
54
#endif
/* -- OTest2__INCLUDE_OTEST2_TIMESOURCESYS_H_ */
OTest2::TimeSourceSys
Source of current system time.
Definition:
timesourcesys.h:30
OTest2::TimeSourceSys::now
virtual time_point now() override
Get current time.
Definition:
timesourcesys.cpp:34
OTest2::TimeSource
Generic interface for getting of current time.
Definition:
timesource.h:30
OTest2
Definition:
assertbean.h:25
OTest2::TimeSourceSys::operator=
TimeSourceSys & operator=(const TimeSourceSys &)=delete
OTest2::TimeSourceSys::TimeSourceSys
TimeSourceSys()
Definition:
timesourcesys.cpp:26
timesource.h
OTest2::TimeSource::time_point
std::chrono::system_clock::time_point time_point
Definition:
timesource.h:32
OTest2::TimeSourceSys::~TimeSourceSys
virtual ~TimeSourceSys()
Dtor.
Definition:
timesourcesys.cpp:30
Generated by
1.8.17