![]() |
|
PhoenixClock
2.2.0
Library wrapping the usage of system's clock, allowing to use clock mock-ups
|
Mock of a clock. More...
#include <PClockMock.h>
Public Member Functions | |
| void | close () |
| Close the mock. | |
| time_t | now () |
| Get the mocked current time. | |
| PClockMock () | |
| Default constructor of PClockMock. | |
| void | resetIndex () |
| Reset the mock index to the beginning. | |
| void | setCurrentTime (time_t currentTime) |
| Set the current time to be recorded. | |
| void | setMockPrefix (const std::string &mockPrefix) |
| Set the mock directory. | |
| void | sleep (EllapsedTime sleepTime) const |
| Sleep for the given time. | |
| virtual | ~PClockMock () |
| Destructor of PClockMock. | |
Private Member Functions | |
| void | initialisationPClockMock () |
| Initialisation function of the class PClockMock. | |
Private Attributes | |
| PGenericVecMock< time_t > | p_mock |
| Mock handler. | |
Mock of a clock.
Definition at line 14 of file PClockMock.h.
| PClockMock::PClockMock | ( | ) |
Default constructor of PClockMock.
Definition at line 21 of file PClockMock.cpp.
References initialisationPClockMock().
Here is the call graph for this function:
|
virtual |
Destructor of PClockMock.
Definition at line 26 of file PClockMock.cpp.
References close().
Here is the call graph for this function:| void PClockMock::close | ( | ) |
Close the mock.
Definition at line 71 of file PClockMock.cpp.
References p_mock.
Referenced by phoenix_createClockMock(), and ~PClockMock().
Here is the caller graph for this function:
|
private |
Initialisation function of the class PClockMock.
Definition at line 76 of file PClockMock.cpp.
Referenced by PClockMock().
Here is the caller graph for this function:| time_t PClockMock::now | ( | ) |
Get the mocked current time.
Definition at line 33 of file PClockMock.cpp.
References p_mock.
| void PClockMock::resetIndex | ( | ) |
Reset the mock index to the beginning.
Definition at line 66 of file PClockMock.cpp.
References p_mock.
| void PClockMock::setCurrentTime | ( | time_t | currentTime | ) |
Set the current time to be recorded.
| currentTime | : current time to be recorded |
Definition at line 50 of file PClockMock.cpp.
References p_mock.
| void PClockMock::setMockPrefix | ( | const std::string & | mockPrefix | ) |
Set the mock directory.
| mockDirectory | : mock directory |
Definition at line 59 of file PClockMock.cpp.
References p_mock.
Referenced by phoenix_createMockBackend().
Here is the caller graph for this function:| void PClockMock::sleep | ( | EllapsedTime | sleepTime | ) | const |
Sleep for the given time.
| sleepTime | : time to sleep |
Definition at line 43 of file PClockMock.cpp.
|
private |
Mock handler.
Definition at line 31 of file PClockMock.h.
Referenced by close(), now(), resetIndex(), setCurrentTime(), and setMockPrefix().