124 inline long long time_abs(
long long n) {
return llabs(n);}
186 friend std::ostream& (::operator<<)(std::ostream&,
const Time&);
199 tics(tics), steps(steps), ms(ms) {}
211 #define LIM_POS_INF_ms double_t_max // because C++ bites
217 #define LIM_NEG_INF_ms (-double_t_max) // c++ bites
279 t.t *
Range::TICS_PER_STEP :
286 static_cast<
tic_t>(t.t *
Range::TICS_PER_MS + 0.5) :
476 if (t.
tics == 0 || n/t.
tics == factor)
479 if ((t.
tics > 0 && factor > 0) || (t.
tics < 0 && factor < 0))
Time operator+(const Time &t1, const Time &t2)
Definition: nest_time.h:463
static double_t TICS_PER_MS
Definition: nest_time.h:146
const Name N("N")
Specific to population point process model (pp_pop_psc_delta)
Definition: nest_names.h:203
static void reset_to_defaults()
Definition: nest_time.cpp:143
void set_to_zero()
Definition: nest_time.h:315
bool operator>(const Time &t1, const Time &t2)
Definition: nest_time.h:448
friend Time operator-(const Time &t1, const Time &t2)
Definition: nest_time.h:468
bool is_step() const
Definition: nest_time.h:340
static double_t get_ms_per_tic()
Definition: nest_time.h:355
static tic_t TICS_PER_STEP_RND
Definition: nest_time.h:143
ms(const Token &t)
Definition: nest_time.h:242
const long_t delay_max
Definition: nest.h:179
static Limit LIM_MIN
Definition: nest_time.h:203
static Time min()
Definition: nest_time.h:354
ms(long_t t)
Definition: nest_time.h:239
long ld_round(double x)
Round to nearest int, rounding midpoints upwards.
Definition: numerics.cpp:83
Time(tic t)
Definition: nest_time.h:270
Definition: nest_time.h:230
ms_stamp(long_t t)
Definition: nest_time.h:248
static double_t delay_steps_to_ms(delay steps)
Convert between delays given in steps and milliseconds.
Definition: nest_time.h:411
delay get_steps() const
Definition: nest_time.h:395
Definition: nest_time.h:214
static const tic_t tics
Definition: nest_time.h:209
bool operator==(const Time &t1, const Time &t2)
Definition: nest_time.h:433
double_t t
Definition: nest_time.h:236
friend struct tic
Definition: nest_time.h:172
Time operator-(const Time &t1, const Time &t2)
Definition: nest_time.h:468
bool operator>=(const Time &t1, const Time &t2)
Definition: nest_time.h:458
Time(ms_stamp t)
Definition: nest_time.h:292
delay t
Definition: nest_time.h:231
static struct nest::Time::LimitPosInf LIM_POS_INF
Definition: nest_time.h:141
Time()
Definition: nest_time.h:264
bool is_multiple_of(const Time &divisor) const
Definition: nest_time.h:344
std::ostream & operator<<(std::ostream &, const nest::Time &)
Definition: nest_time.cpp:156
void calibrate()
Definition: nest_time.h:369
Definition: nest_time.h:235
static double_t MS_PER_TIC
Definition: nest_time.h:147
friend struct ms_stamp
Definition: nest_time.h:174
static Time neg_inf()
Definition: nest_time.h:356
tic(tic_t t)
Definition: nest_time.h:227
Definition: nest_time.h:208
static double_t STEPS_PER_MS
Definition: nest_time.h:148
Definition: nest_time.h:130
Time(tic_t tics)
Definition: nest_time.h:258
bool operator<(const Event &, const Event &)
Definition: event_priority.h:44
static const tic_t TICS_PER_STEP_DEFAULT
Definition: nest_time.h:151
friend Time operator*(const long_t factor, const Time &t)
Definition: nest_time.h:473
long long tic_t
Type for Time tics.
Definition: nest.h:82
double_t t
Definition: nest_time.h:246
bool is_neg_inf() const
Definition: nest_time.h:333
static double_t MS_PER_STEP
Definition: nest_time.h:149
static tic_t TICS_PER_STEP
Definition: nest_time.h:142
void advance()
Definition: nest_time.h:317
Limit(tic_t tics, delay steps, double_t ms)
Definition: nest_time.h:198
Time & operator+=(const Time &t)
Definition: nest_time.h:375
const Time TimeZero
Definition: nest_time.h:426
static delay delay_ms_to_steps(double_t ms)
Definition: nest_time.h:415
static double_t get_tics_per_ms()
Definition: nest_time.h:387
static Time max()
Definition: nest_time.h:353
double_t ms
Definition: nest_time.h:196
static bool resolution_is_default()
Definition: nest_time.h:307
static tic_t get_tics_per_step()
Definition: nest_time.h:386
friend bool operator>=(const Time &t1, const Time &t2)
Definition: nest_time.h:458
static tic_t compute_max()
Definition: nest_time.cpp:58
step(delay t)
Definition: nest_time.h:232
static Limit LIM_MAX
Definition: nest_time.h:202
static void set_resolution(double_t tics_per_ms)
Definition: nest_time.cpp:80
N time_abs(const N n)
Class to handle simulation time and realtime.
Definition: nest_time.h:121
friend bool operator==(const Time &t1, const Time &t2)
Definition: nest_time.h:433
void range()
Definition: nest_time.h:363
static void reset_resolution()
Definition: nest_time.cpp:102
ms_stamp(double_t t)
Definition: nest_time.h:247
tic_t tics
Definition: nest_time.h:194
tic_t tics
Definition: nest_time.h:165
ms(double_t t)
Definition: nest_time.h:238
friend bool operator>(const Time &t1, const Time &t2)
Definition: nest_time.h:448
double double_t
Double precision floating point numbers.
Definition: nest.h:93
static Time pos_inf()
Definition: nest_time.h:357
static const double_t TICS_PER_MS_DEFAULT
Definition: nest_time.h:152
Time(step t)
Definition: nest_time.h:277
static tic_t fromstamp(ms_stamp)
Definition: nest_time.cpp:127
friend bool operator<=(const Time &t1, const Time &t2)
Definition: nest_time.h:453
Definition: nest_time.h:225
tic_t t
Definition: nest_time.h:226
double_t get_ms() const
Definition: nest_time.h:389
bool operator<=(const Time &t1, const Time &t2)
Definition: nest_time.h:453
static Time get_resolution()
Definition: nest_time.h:303
bool is_finite() const
Definition: nest_time.h:329
static const delay steps
Definition: nest_time.h:216
static const tic_t tics
Definition: nest_time.h:215
Time::Limit limit(const tic_t &)
delay steps
Definition: nest_time.h:195
const Name n("n")
Number of synaptic release sites (int >=0) (Tsodyks2_connection)
Definition: nest_names.h:202
long_t delay
Delay of a connection.
Definition: nest.h:178
tic_t get_tics() const
Definition: nest_time.h:385
Definition: nest_time.h:245
Default types used by the NEST kernel.
friend bool operator!=(const Time &t1, const Time &t2)
Definition: nest_time.h:438
Time(ms t)
Definition: nest_time.h:284
static tic_t OLD_TICS_PER_STEP
Definition: nest_time.h:144
A type-independent container for C++-types.
Definition: token.h:68
const tic_t tic_t_max
Definition: nest.h:83
Time pred() const
Definition: nest_time.h:323
Time succ() const
Definition: nest_time.h:322
friend Time operator+(const Time &t1, const Time &t2)
Definition: nest_time.h:463
long long_t
Integer number with at least 32 bit.
Definition: nest.h:96
static double_t fromtoken(const Token &t)
Definition: nest_time.cpp:115
static const delay steps
Definition: nest_time.h:210
bool is_grid_time() const
Definition: nest_time.h:337
static const long_t INF_MARGIN
Definition: nest_time.h:154
bool operator!=(const Time &t1, const Time &t2)
Definition: nest_time.h:438
static struct nest::Time::LimitNegInf LIM_NEG_INF
Definition: nest_time.h:193
Time operator*(const long_t factor, const Time &t)
Definition: nest_time.h:473
friend bool operator<(const Time &t1, const Time &t2)
Definition: nest_time.h:443