![]() |
SimulationCraft
SimulationCraft is a tool to explore combat mechanics in the popular MMO RPG World of Warcraft (tm).
|
Class for representing InGame time. More...
#include <sc_timespan.hpp>
Public Types | |
typedef time_t | native_t |
Public Member Functions | |
double | total_minutes () const |
double | total_seconds () const |
time_t | total_millis () const |
bool | operator== (timespan_t right) const |
bool | operator!= (timespan_t right) const |
bool | operator> (timespan_t right) const |
bool | operator>= (timespan_t right) const |
bool | operator< (timespan_t right) const |
bool | operator<= (timespan_t right) const |
timespan_t & | operator+= (timespan_t right) |
timespan_t & | operator-= (timespan_t right) |
timespan_t & | operator%= (timespan_t right) |
template<typename Rep > | |
std::enable_if < std::is_arithmetic< Rep > ::value, timespan_t & >::type | operator*= (Rep right) |
template<typename Rep > | |
std::enable_if < std::is_arithmetic< Rep > ::value, timespan_t & >::type | operator/= (Rep right) |
Static Public Member Functions | |
template<typename Rep > | |
static constexpr std::enable_if < std::is_arithmetic< Rep > ::value, timespan_t >::type | from_millis (Rep millis) |
template<typename Rep > | |
static constexpr std::enable_if < std::is_arithmetic< Rep > ::value, timespan_t >::type | from_seconds (Rep seconds) |
template<typename Rep > | |
static constexpr std::enable_if < std::is_arithmetic< Rep > ::value, timespan_t >::type | from_minutes (Rep minutes) |
static native_t | to_native (timespan_t t) |
template<typename Rep > | |
static constexpr timespan_t | from_native (Rep t) |
static constexpr timespan_t | zero () |
static constexpr timespan_t | max () |
static constexpr timespan_t | min () |
Friends | |
timespan_t | operator+ (timespan_t right) |
timespan_t | operator- (timespan_t right) |
timespan_t | operator+ (timespan_t left, timespan_t right) |
timespan_t | operator- (timespan_t left, timespan_t right) |
template<typename Rep > | |
std::enable_if < std::is_arithmetic< Rep > ::value, timespan_t >::type | operator* (timespan_t left, Rep right) |
template<typename Rep > | |
std::enable_if < std::is_arithmetic< Rep > ::value, timespan_t >::type | operator* (Rep left, timespan_t right) |
template<typename Rep > | |
std::enable_if < std::is_arithmetic< Rep > ::value, timespan_t >::type | operator/ (timespan_t left, Rep right) |
double | operator/ (timespan_t left, timespan_t right) |
timespan_t | operator% (timespan_t left, timespan_t right) |
Class for representing InGame time.
World of Warcraft handles InGame time/events in milliseconds. This class emulates that format for exactness, as well as representing C++ type-safety when defining time values, without implicit conversion from or to any integral or floating numbers.