SystemC  2.3.2
Accellera SystemC proof-of-concept library
sc_core::sc_time Class Reference

The time class. More...

#include <sysc/kernel/sc_time.h>

Public Types

typedef sc_dt::uint64 value_type
 

Public Member Functions

 sc_time ()
 
 sc_time (const sc_time &)
 
 sc_time (double, sc_time_unit)
 
 sc_time (double, sc_time_unit, sc_simcontext *)
 
 sc_time (double, const char *unit)
 
 sc_time (double, const char *unit, sc_simcontext *)
 
 sc_time (double, bool scale)
 
 sc_time (value_type, bool scale)
 
sc_timeoperator= (const sc_time &)
 
value_type value () const
 
double to_double () const
 
double to_default_time_units () const
 
double to_seconds () const
 
const std::string to_string () const
 
bool operator== (const sc_time &) const
 
bool operator!= (const sc_time &) const
 
bool operator< (const sc_time &) const
 
bool operator<= (const sc_time &) const
 
bool operator> (const sc_time &) const
 
bool operator>= (const sc_time &) const
 
sc_timeoperator+= (const sc_time &)
 
sc_timeoperator-= (const sc_time &)
 
sc_timeoperator*= (double)
 
sc_timeoperator/= (double)
 
sc_timeoperator%= (const sc_time &)
 
void print (::std::ostream &os=std::cout) const
 

Static Public Member Functions

static sc_time from_value (value_type)
 
static sc_time from_seconds (double)
 
static sc_time from_string (const char *str)
 

Friends

const sc_time operator+ (const sc_time &, const sc_time &)
 
const sc_time operator- (const sc_time &, const sc_time &)
 
const sc_time operator* (const sc_time &, double)
 
const sc_time operator* (double, const sc_time &)
 
const sc_time operator/ (const sc_time &, double)
 
double operator/ (const sc_time &, const sc_time &)
 
const sc_time operator% (const sc_time &, const sc_time &)
 

Detailed Description

The time class.

Definition at line 82 of file sc_time.h.

Member Typedef Documentation

◆ value_type

Definition at line 86 of file sc_time.h.

Constructor & Destructor Documentation

◆ sc_time() [1/8]

sc_core::sc_time::sc_time ( )
inline

Definition at line 210 of file sc_time.h.

◆ sc_time() [2/8]

sc_core::sc_time::sc_time ( const sc_time t)
inline

Definition at line 215 of file sc_time.h.

◆ sc_time() [3/8]

sc_core::sc_time::sc_time ( double  ,
sc_time_unit   
)

◆ sc_time() [4/8]

sc_core::sc_time::sc_time ( double  ,
sc_time_unit  ,
sc_simcontext  
)

◆ sc_time() [5/8]

sc_core::sc_time::sc_time ( double  ,
const char *  unit 
)

◆ sc_time() [6/8]

sc_core::sc_time::sc_time ( double  ,
const char *  unit,
sc_simcontext  
)

◆ sc_time() [7/8]

sc_core::sc_time::sc_time ( double  ,
bool  scale 
)

◆ sc_time() [8/8]

sc_core::sc_time::sc_time ( value_type  ,
bool  scale 
)

Member Function Documentation

◆ from_seconds()

sc_time sc_core::sc_time::from_seconds ( double  v)
inlinestatic

Definition at line 237 of file sc_time.h.

◆ from_string()

static sc_time sc_core::sc_time::from_string ( const char *  str)
static

◆ from_value()

static sc_time sc_core::sc_time::from_value ( value_type  )
static

◆ operator!=()

bool sc_core::sc_time::operator!= ( const sc_time t) const
inline

Definition at line 299 of file sc_time.h.

◆ operator%=()

sc_time & sc_core::sc_time::operator%= ( const sc_time t)
inline

Definition at line 389 of file sc_time.h.

◆ operator*=()

sc_time & sc_core::sc_time::operator*= ( double  d)
inline

Definition at line 369 of file sc_time.h.

◆ operator+=()

sc_time & sc_core::sc_time::operator+= ( const sc_time t)
inline

Definition at line 337 of file sc_time.h.

◆ operator-=()

sc_time & sc_core::sc_time::operator-= ( const sc_time t)
inline

Definition at line 345 of file sc_time.h.

◆ operator/=()

sc_time & sc_core::sc_time::operator/= ( double  d)
inline

Definition at line 379 of file sc_time.h.

◆ operator<()

bool sc_core::sc_time::operator< ( const sc_time t) const
inline

Definition at line 306 of file sc_time.h.

◆ operator<=()

bool sc_core::sc_time::operator<= ( const sc_time t) const
inline

Definition at line 313 of file sc_time.h.

◆ operator=()

sc_time & sc_core::sc_time::operator= ( const sc_time t)
inline

Definition at line 247 of file sc_time.h.

◆ operator==()

bool sc_core::sc_time::operator== ( const sc_time t) const
inline

Definition at line 292 of file sc_time.h.

◆ operator>()

bool sc_core::sc_time::operator> ( const sc_time t) const
inline

Definition at line 320 of file sc_time.h.

◆ operator>=()

bool sc_core::sc_time::operator>= ( const sc_time t) const
inline

Definition at line 327 of file sc_time.h.

◆ print()

void sc_core::sc_time::print ( ::std::ostream &  os = std::cout) const

◆ to_default_time_units()

double sc_core::sc_time::to_default_time_units ( ) const

◆ to_double()

double sc_core::sc_time::to_double ( ) const
inline

Definition at line 266 of file sc_time.h.

◆ to_seconds()

double sc_core::sc_time::to_seconds ( ) const

◆ to_string()

const std::string sc_core::sc_time::to_string ( ) const
inline

Definition at line 282 of file sc_time.h.

◆ value()

sc_time::value_type sc_core::sc_time::value ( ) const
inline

Definition at line 258 of file sc_time.h.

Friends And Related Function Documentation

◆ operator%

const sc_time operator% ( const sc_time t1,
const sc_time t2 
)
friend

Definition at line 428 of file sc_time.h.

◆ operator* [1/2]

const sc_time operator* ( const sc_time t,
double  d 
)
friend

Definition at line 397 of file sc_time.h.

◆ operator* [2/2]

const sc_time operator* ( double  d,
const sc_time t 
)
friend

Definition at line 405 of file sc_time.h.

◆ operator+

const sc_time operator+ ( const sc_time t1,
const sc_time t2 
)
friend

Definition at line 354 of file sc_time.h.

◆ operator-

const sc_time operator- ( const sc_time t1,
const sc_time t2 
)
friend

Definition at line 361 of file sc_time.h.

◆ operator/ [1/2]

const sc_time operator/ ( const sc_time t,
double  d 
)
friend

Definition at line 413 of file sc_time.h.

◆ operator/ [2/2]

double operator/ ( const sc_time t1,
const sc_time t2 
)
friend

Definition at line 421 of file sc_time.h.


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