NEST main@caf0ae8
 
Loading...
Searching...
No Matches
nest::TimeConverter Class Reference

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TimeConverter()

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.

Here is the call graph for this function:

Member Function Documentation

◆ from_old_steps()

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().

Here is the caller graph for this function:

◆ from_old_tics()

Time nest::TimeConverter::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.

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().

Here is the caller graph for this function:

Member Data Documentation

◆ OLD_TICS_PER_MS

double nest::TimeConverter::OLD_TICS_PER_MS
private

◆ OLD_TICS_PER_STEP

double nest::TimeConverter::OLD_TICS_PER_STEP
private

Referenced by from_old_steps(), and TimeConverter().


The documentation for this class was generated from the following files: