gem5  v22.1.0.0
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
sc_core::sc_time Class Reference

#include <sc_time.hh>

Public Member Functions

 sc_time ()
 
 sc_time (double, sc_time_unit)
 
 sc_time (const sc_time &)
 
 sc_time (double, const char *)
 
 sc_time (double, bool)
 
 sc_time (sc_dt::uint64, bool)
 
sc_timeoperator= (const sc_time &)
 
sc_dt::uint64 value () const
 
double to_double () 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)
 
void print (std::ostream &=std::cout) const
 

Static Public Member Functions

static sc_time from_value (sc_dt::uint64)
 
static sc_time from_seconds (double)
 
static sc_time from_string (const char *str)
 

Private Attributes

uint64_t val
 

Detailed Description

Definition at line 49 of file sc_time.hh.

Constructor & Destructor Documentation

◆ sc_time() [1/6]

sc_core::sc_time::sc_time ( )

Definition at line 64 of file sc_time.cc.

Referenced by from_string().

◆ sc_time() [2/6]

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

Definition at line 66 of file sc_time.cc.

References gem5::ArmISA::d, gem5::ArmISA::set, gem5::MipsISA::tu, and val.

◆ sc_time() [3/6]

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

Definition at line 72 of file sc_time.cc.

References gem5::VegaISA::t, and val.

◆ sc_time() [4/6]

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

◆ sc_time() [5/6]

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

◆ sc_time() [6/6]

sc_core::sc_time::sc_time ( sc_dt::uint64  v,
bool  scale 
)

Member Function Documentation

◆ from_seconds()

sc_time sc_core::sc_time::from_seconds ( double  d)
static

Definition at line 220 of file sc_time.cc.

References gem5::ArmISA::d, sc_core::SC_SEC, gem5::ArmISA::set, and gem5::VegaISA::t.

◆ from_string()

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

◆ from_value()

sc_time sc_core::sc_time::from_value ( sc_dt::uint64  u)
static

◆ operator!=()

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

Definition at line 146 of file sc_time.cc.

References gem5::VegaISA::t, and val.

◆ operator*=()

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

Definition at line 190 of file sc_time.cc.

References gem5::ArmISA::d, and val.

◆ operator+=()

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

Definition at line 176 of file sc_time.cc.

References gem5::VegaISA::t, and val.

◆ operator-=()

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

Definition at line 183 of file sc_time.cc.

References gem5::VegaISA::t, and val.

◆ operator/=()

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

Definition at line 197 of file sc_time.cc.

References gem5::ArmISA::d, and val.

◆ operator<()

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

Definition at line 151 of file sc_time.cc.

References gem5::VegaISA::t, and val.

◆ operator<=()

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

Definition at line 157 of file sc_time.cc.

References gem5::VegaISA::t, and val.

◆ operator=()

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

Definition at line 108 of file sc_time.cc.

References gem5::VegaISA::t, and val.

◆ operator==()

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

Definition at line 140 of file sc_time.cc.

References gem5::VegaISA::t, and val.

◆ operator>()

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

Definition at line 164 of file sc_time.cc.

References gem5::VegaISA::t, and val.

◆ operator>=()

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

Definition at line 170 of file sc_time.cc.

References gem5::VegaISA::t, and val.

◆ print()

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

Definition at line 204 of file sc_time.cc.

References gem5::X86ISA::os, and sc_core::sc_time_tuple::to_string().

Referenced by to_string().

◆ to_double()

double sc_core::sc_time::to_double ( ) const

Definition at line 121 of file sc_time.cc.

References val.

Referenced by to_seconds().

◆ to_seconds()

double sc_core::sc_time::to_seconds ( ) const

Definition at line 126 of file sc_time.cc.

References gem5::sim_clock::as_float::Hz, and to_double().

◆ to_string()

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

Definition at line 132 of file sc_time.cc.

References print(), and ss.

Referenced by sc_core::sc_report_compose_message().

◆ value()

sc_dt::uint64 sc_core::sc_time::value ( void  ) const

Member Data Documentation

◆ val

uint64_t sc_core::sc_time::val
private

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

Generated on Wed Dec 21 2022 10:25:07 for gem5 by doxygen 1.9.1