This utility can be used to compute the time employed on computations.
More...
#include <timer.h>
This utility can be used to compute the time employed on computations.
- Author
- Pooyan Dadvand
-
Riccardo Rossi
-
Vicente Mataix Ferrandiz
◆ ContainerType
The timer data container type (map)
◆ InternalNameDatabaseType
This is used to know the internal name used for the time table.
◆ TimeType
The type of float used to store the time.
◆ Timer()
◆ ~Timer()
virtual Kratos::Timer::~Timer |
( |
| ) |
|
|
inlinevirtual |
◆ CloseOuputFile()
int Kratos::Timer::CloseOuputFile |
( |
| ) |
|
|
static |
This method closes the output file.
◆ ElapsedSeconds()
static double Kratos::Timer::ElapsedSeconds |
( |
const std::chrono::steady_clock::time_point |
StartTime | ) |
|
|
inlinestatic |
This method returns the resulting time.
◆ GetPrintIntervalInformation()
bool Kratos::Timer::GetPrintIntervalInformation |
( |
| ) |
|
|
static |
This method gets the variable which stores if the information is printed on each interval.
- Returns
- True if the information is printed on each interval, false otherwise
◆ GetPrintOnScreen()
bool Kratos::Timer::GetPrintOnScreen |
( |
| ) |
|
|
static |
This method gets the variable which stores if the information is printed on screen.
- Returns
- True if the information is printed on screen, false otherwise
◆ GetTime()
static double Kratos::Timer::GetTime |
( |
| ) |
|
|
inlinestatic |
This method returns the resulting time.
◆ Info()
virtual std::string Kratos::Timer::Info |
( |
| ) |
const |
|
inlinevirtual |
Turn back information as a string.
◆ KRATOS_CLASS_POINTER_DEFINITION()
Kratos::Timer::KRATOS_CLASS_POINTER_DEFINITION |
( |
Timer |
| ) |
|
Pointer definition of Timer.
◆ PrintData()
virtual void Kratos::Timer::PrintData |
( |
std::ostream & |
rOStream | ) |
const |
|
inlinevirtual |
◆ PrintInfo()
virtual void Kratos::Timer::PrintInfo |
( |
std::ostream & |
rOStream | ) |
const |
|
inlinevirtual |
Print information about this object.
◆ PrintIntervalInformation() [1/2]
void Kratos::Timer::PrintIntervalInformation |
( |
std::ostream & |
rOStream, |
|
|
std::string const & |
rIntervalName, |
|
|
const double |
StartTime, |
|
|
const double |
StopTime |
|
) |
| |
|
static |
This method prints the internal information in a given stream.
- Parameters
-
rOStream | The strem considered |
rIntervalName | The internal name that will store the timing data |
StartTime | The starting time |
StopTime | The stoping time |
◆ PrintIntervalInformation() [2/2]
void Kratos::Timer::PrintIntervalInformation |
( |
std::string const & |
rIntervalName, |
|
|
const double |
StartTime, |
|
|
const double |
StopTime |
|
) |
| |
|
static |
This method prints the internal information.
- Parameters
-
rIntervalName | The internal name that will store the timing data |
StartTime | The starting time |
StopTime | The stoping time |
◆ PrintTimingInformation() [1/2]
void Kratos::Timer::PrintTimingInformation |
( |
| ) |
|
|
static |
This method prints the timing information.
◆ PrintTimingInformation() [2/2]
void Kratos::Timer::PrintTimingInformation |
( |
std::ostream & |
rOStream | ) |
|
|
static |
This method prints the timing information in a giving stream.
- Parameters
-
rOStream | The strem considered |
◆ SetOuputFile()
int Kratos::Timer::SetOuputFile |
( |
std::string const & |
rOutputFileName | ) |
|
|
static |
This method sets the output file *.time that will store the timing.
- Parameters
-
rOutputFileName | The name of the output file |
◆ SetPrintIntervalInformation()
void Kratos::Timer::SetPrintIntervalInformation |
( |
bool const |
PrintIntervalInformation | ) |
|
|
static |
This method sets the variable which stores if the information is printed on each interval.
- Parameters
-
PrintIntervalInformation | True if the information is printed on each interval, false otherwise |
◆ SetPrintOnScreen()
void Kratos::Timer::SetPrintOnScreen |
( |
bool const |
PrintOnScreen | ) |
|
|
static |
This method sets the variable which stores if the information is printed on screen.
- Parameters
-
PrintOnScreen | True if the information is printed on screen, false otherwise |
◆ Start()
void Kratos::Timer::Start |
( |
std::string const & |
rIntervalName | ) |
|
|
static |
This method starts the timer meassures.
- Parameters
-
rIntervalName | The internal name that will store the timing data |
◆ Stop()
void Kratos::Timer::Stop |
( |
std::string const & |
rIntervalName | ) |
|
|
static |
This method stops the timer meassures.
- Parameters
-
rIntervalName | The internal name that will store the timing data |
◆ NumberOfZeros
constexpr std::size_t Kratos::Timer::NumberOfZeros = 3 |
|
staticconstexpr |
The number of 0 in the internal name.
The documentation for this class was generated from the following files:
- /home/runner/work/Documentation/Documentation/master/kratos/utilities/timer.h
- /home/runner/work/Documentation/Documentation/master/kratos/utilities/timer.cpp