mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-24 18:04:14 +08:00
Ref T397, allow to set adjusted time
This commit is contained in:
@@ -191,6 +191,9 @@ namespace BlackMisc
|
|||||||
//! Timestamp with offset added for interpolation
|
//! Timestamp with offset added for interpolation
|
||||||
qint64 getAdjustedMSecsSinceEpoch() const { return this->getMSecsSinceEpoch() + this->getTimeOffsetMs(); }
|
qint64 getAdjustedMSecsSinceEpoch() const { return this->getMSecsSinceEpoch() + this->getTimeOffsetMs(); }
|
||||||
|
|
||||||
|
//! Set timestamp with offset added for interpolation
|
||||||
|
void setAdjustedMSecsSinceEpoch(qint64 adjustedTimeMs) { this->setMSecsSinceEpoch(adjustedTimeMs - this->getTimeOffsetMs()); }
|
||||||
|
|
||||||
//! Time difference in ms (this -> compare)
|
//! Time difference in ms (this -> compare)
|
||||||
qint64 getAdjustedTimeDifferenceMs(qint64 compareTime) const { return this->getAdjustedMSecsSinceEpoch() - compareTime; }
|
qint64 getAdjustedTimeDifferenceMs(qint64 compareTime) const { return this->getAdjustedMSecsSinceEpoch() - compareTime; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user