Example #1
0
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;
}
Example #2
0
bool Duration::operator<(const Duration& duration) const {
    return getSeconds() < duration.getSeconds();
}
Example #3
0
Meters MetersPerSecond::operator*(const Duration& duration) const {
    return Meters(getMetersPerSecond() * duration.getSeconds());
}