#include <chrono>
#include <map>
#include <fstream>
#include <filesystem>
#include <unistd.h>
Go to the source code of this file.
◆ NRP_LOG_TIME
#define NRP_LOG_TIME |
( |
|
filename | ) |
|
◆ NRP_LOG_TIME_BLOCK
#define NRP_LOG_TIME_BLOCK |
( |
|
filename | ) |
|
◆ NRP_LOG_TIME_BLOCK_WITH_COMMENT
#define NRP_LOG_TIME_BLOCK_WITH_COMMENT |
( |
|
filename, |
|
|
|
comment |
|
) |
| |
◆ NRP_LOG_TIME_SET_START
#define NRP_LOG_TIME_SET_START |
◆ NRP_LOG_TIME_WITH_COMMENT
#define NRP_LOG_TIME_WITH_COMMENT |
( |
|
filename, |
|
|
|
comment |
|
) |
| |
◆ SimulationTime
◆ getRoundedRunTimeMs()
double getRoundedRunTimeMs |
( |
const SimulationTime |
runTime, |
|
|
const float |
simulationResolutionMs |
|
) |
| |
Calculates simulation run time rounded to milliseconds, accounting for given resolution.
- Parameters
-
runTime | Simulation run time that will be rounded |
simulationResolutionMs | Simulation resolution in milliseconds |
- Exceptions
-
NRPException | When simulation run time is smaller than simulation resolution |
- Returns
- Rounded simulation run time
◆ getTimestamp()
std::string getTimestamp |
( |
| ) |
|
returns the current local time as a string in the format: YYMMDD-hhmmss-pid, being pid the pid of the calling process
◆ toSimulationTimeFromSeconds()
Converts floating-point seconds into SimulationTime.
- Parameters
-
time | The value to be converted |
- Returns
- SimulationTime object that corresponds to the argument