예제 #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;
}
예제 #2
0
파일: Duration.cpp 프로젝트: mackorone/mms
bool Duration::operator<(const Duration& duration) const {
    return getSeconds() < duration.getSeconds();
}
예제 #3
0
Meters MetersPerSecond::operator*(const Duration& duration) const {
    return Meters(getMetersPerSecond() * duration.getSeconds());
}