std::string SimUtilities::timestampToDatetimeString(const Duration& timestamp) { time_t now = timestamp.getSeconds(); struct tm tstruct = {0}; tstruct = *gmtime(&now); char buf[80]; strftime(buf, sizeof(buf), "%Y-%m-%d %X", &tstruct); return buf; }
bool Duration::operator<(const Duration& duration) const { return getSeconds() < duration.getSeconds(); }
Meters MetersPerSecond::operator*(const Duration& duration) const { return Meters(getMetersPerSecond() * duration.getSeconds()); }