SST
8.0.0
StructuralSimulationToolkit
|
Class for creating and managing TimeConverter objects. More...
#include <timeLord.h>
Public Member Functions | |
TimeConverter * | getTimeConverter (std::string ts) |
Create a new TimeConverter object using specified SI Units. More... | |
TimeConverter * | getTimeConverter (const UnitAlgebra &ts) |
Create a new TimeConverter object using the specified units. More... | |
SimTime_t | getSimCycles (std::string timeString, std::string where) |
Not a Public API. More... | |
UnitAlgebra | getTimeBase () const |
Return the Time Base of the TimeLord. | |
TimeConverter * | getNano () |
Return a TimeConverter which represents Nanoseconds. | |
TimeConverter * | getMicro () |
Return a TimeConverter which represents Microseconds. | |
TimeConverter * | getMilli () |
Return a TimeConverter which represents Milliseconds. | |
Friends | |
class | SST::Simulation |
Class for creating and managing TimeConverter objects.
SimTime_t SST::TimeLord::getSimCycles | ( | std::string | timeString, |
std::string | where | ||
) |
Not a Public API.
Returns the number of raw simulation cycles given by a specified time string
References SST::TimeConverter::getFactor(), and getTimeConverter().
Referenced by SST::Link::addRecvLatency(), and SST::Simulation::setStopAtCycle().
TimeConverter * SST::TimeLord::getTimeConverter | ( | std::string | ts | ) |
Create a new TimeConverter object using specified SI Units.
For example, "1 Ghz" (1 Gigahertz), "2.5 ns" (2.5 nanoseconds).
ts | String indicating the base unit for this object. The string should be a floating point number followed by a prefix, and then frequency (i.e. Hz) or time unit (s). Allowable seconds prefixes are: 'f' (fempto), 'p' (pico), 'n' (nano), 'u' (micro), 'm' (milli). Allowable frequency prefixes are 'k' (kilo), 'M' (mega), and 'G' (giga). |
Referenced by getSimCycles(), getTimeConverter(), SST::Simulation::registerClock(), and SST::BaseComponent::registerTimeBase().
TimeConverter * SST::TimeLord::getTimeConverter | ( | const UnitAlgebra & | ts | ) |
Create a new TimeConverter object using the specified units.
ts | UnitAlgebra object indicating the base unit for this object. |
References SST::Output::fatal(), SST::UnitAlgebra::getRoundedValue(), getTimeConverter(), SST::UnitAlgebra::getValue(), SST::UnitAlgebra::hasUnits(), SST::UnitAlgebra::invert(), SST::UnitAlgebra::toString(), and SST::UnitAlgebra::toStringBestSI().