Class to convert times from one representation to another. More...
#include <nest_timeconverter.h>
Public Member Functions | |
| TimeConverter () | |
| Constructor saves current TICS_PER_MS and TICS_PER_STEP in members OLD_TICS_PER_MS, OLD_TICS_PER_STEP. | |
| Time | from_old_steps (long s_old) const |
| Converts a given number of steps with respect to old representation into a time object in current representation. | |
| Time | from_old_tics (tic_t t_old) const |
| Converts a given number of tics with respect to old representation into a time object in current representation. | |
Private Attributes | |
| double | OLD_TICS_PER_MS |
| double | OLD_TICS_PER_STEP |
Class to convert times from one representation to another.
Creating an object of TimeConverter at a current time representation saves the current values of TICS_PER_MS and TICS_PER_STEP. After having changed the time representation, the members from_old_steps and from_old_tics can be used to convert steps or tics given with respect to the old representation in the new representation.
| nest::TimeConverter::TimeConverter | ( | ) |
Constructor saves current TICS_PER_MS and TICS_PER_STEP in members OLD_TICS_PER_MS, OLD_TICS_PER_STEP.
References nest::Time::get_tics_per_ms(), nest::Time::get_tics_per_step(), OLD_TICS_PER_MS, and OLD_TICS_PER_STEP.
| Time nest::TimeConverter::from_old_steps | ( | long | s_old | ) | const |
Converts a given number of steps with respect to old representation into a time object in current representation.
Be careful not to call Time::get_steps() from an old Time object, as it will use the new TICS_PER_STEP constant. Use TimeConverter::from_old_tics instead.
References nest::Time::LIM_NEG_INF, nest::Time::LIM_POS_INF, OLD_TICS_PER_MS, and OLD_TICS_PER_STEP.
Referenced by nest::Connection< targetidentifierT >::calibrate().
Converts a given number of tics with respect to old representation into a time object in current representation.
References nest::Time::LIM_NEG_INF, nest::Time::LIM_POS_INF, and OLD_TICS_PER_MS.
Referenced by nest::DelayChecker::calibrate(), nest::binary_neuron< TGainfunction >::calibrate_time(), nest::correlation_detector::calibrate_time(), nest::correlomatrix_detector::calibrate_time(), nest::correlospinmatrix_detector::calibrate_time(), nest::multimeter::calibrate_time(), nest::noise_generator::calibrate_time(), nest::poisson_generator_ps::calibrate_time(), and nest::spin_detector::calibrate_time().
|
private |
Referenced by from_old_steps(), from_old_tics(), and TimeConverter().
|
private |
Referenced by from_old_steps(), and TimeConverter().