Chrono: add methods ToS(), RoundS()
This commit is contained in:
parent
ad64bab5b2
commit
3ac1475262
@ -58,6 +58,14 @@ public:
|
||||
return SongTime(ms);
|
||||
}
|
||||
|
||||
constexpr rep ToS() const {
|
||||
return count() / rep(1000);
|
||||
}
|
||||
|
||||
constexpr rep RoundS() const {
|
||||
return (count() + 500) / rep(1000);
|
||||
}
|
||||
|
||||
constexpr rep ToMS() const {
|
||||
return count();
|
||||
}
|
||||
@ -129,6 +137,14 @@ public:
|
||||
return SignedSongTime(ms);
|
||||
}
|
||||
|
||||
constexpr rep ToS() const {
|
||||
return count() / rep(1000);
|
||||
}
|
||||
|
||||
constexpr rep RoundS() const {
|
||||
return (count() + 500) / rep(1000);
|
||||
}
|
||||
|
||||
constexpr rep ToMS() const {
|
||||
return count();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user