NEST  2.6.0,not_revisioned_source_dir@0
Public Member Functions | Private Attributes | List of all members
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. More...
 
Time from_old_steps (long_t s_old) const
 Converts a given number of steps with respect to old representation into a time object in current representation. More...
 
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. More...
 

Private Attributes

double_t OLD_TICS_PER_MS
 
double_t OLD_TICS_PER_STEP
 

Detailed Description

Class to convert times from one representation to another.

Createing 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

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.

Member Function Documentation

Time nest::TimeConverter::from_old_steps ( long_t  s_old) const

Converts a given number of steps with respect to old representation into a time object in current representation.

References nest::Time::ms, OLD_TICS_PER_MS, and OLD_TICS_PER_STEP.

Referenced by nest::Connection< targetidentifierT >::calibrate(), and nest::GenericConnectorModel< ConnectionT >::calibrate().

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::ms, and OLD_TICS_PER_MS.

Member Data Documentation

double_t nest::TimeConverter::OLD_TICS_PER_MS
private
double_t 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: