Ref T515, allow to override the timestamps

Rational: Sometime we want to keep a certain order of status messages,
and this can be achieved "by that trick"
This commit is contained in:
Klaus Basan
2019-01-30 19:59:26 +01:00
committed by Mat Sutcliffe
parent 407aaba746
commit e3da559c5e
2 changed files with 48 additions and 0 deletions

View File

@@ -132,6 +132,16 @@ namespace BlackMisc
//! Insert as first element by keeping maxElements and the latest first
void push_frontKeepLatestFirst(const OBJ &value, bool replaceSameTimestamp = true, int maxElements = -1);
//! Push back and increase the timestamp at least by +1ms if equal to last element
//! \remark if the timestamp is already greater it does not modifcation
void push_backIncreaseTimestamp(const OBJ &newObject);
//! Push back, but set new timestamp
void push_backOverrideTimestamp(const OBJ &newObject, qint64 newTsMsSinceEpoch);
//! Set new timestamps starting with the last element
void setNewTimestampStartingLast(qint64 startTimeStampMs, qint64 deltaTimeMs);
//! Replace if an object has the same timestamp
int replaceIfSameTimestamp(const OBJ &newObject);