replaced slotLengthMs with lengthMs
This commit is contained in:
parent
36715e3f4c
commit
7e3af7cf83
@ -3,7 +3,7 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
FixedSlotSequence::FixedSlotSequence(uint32_t setLengthMs) :
|
FixedSlotSequence::FixedSlotSequence(uint32_t setLengthMs) :
|
||||||
slotLengthMs(setLengthMs) {
|
lengthMs(setLengthMs) {
|
||||||
current = slotList.begin();
|
current = slotList.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ uint32_t FixedSlotSequence::getIntervalToNextSlotMs() {
|
|||||||
// the interval is calculated by subtracting the remaining time of the PST
|
// the interval is calculated by subtracting the remaining time of the PST
|
||||||
// and adding the start time of the first handler in the list.
|
// and adding the start time of the first handler in the list.
|
||||||
slotListIter = slotList.begin();
|
slotListIter = slotList.begin();
|
||||||
return slotLengthMs - oldTime + slotListIter->pollingTimeMs;
|
return lengthMs - oldTime + slotListIter->pollingTimeMs;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t FixedSlotSequence::getIntervalToPreviousSlotMs() {
|
uint32_t FixedSlotSequence::getIntervalToPreviousSlotMs() {
|
||||||
@ -61,7 +61,7 @@ uint32_t FixedSlotSequence::getIntervalToPreviousSlotMs() {
|
|||||||
|
|
||||||
//if it is the first slot, calculate difference to last slot
|
//if it is the first slot, calculate difference to last slot
|
||||||
if (slotListIter == slotList.begin()){
|
if (slotListIter == slotList.begin()){
|
||||||
return slotLengthMs - (--slotList.end())->pollingTimeMs + currentTime;
|
return lengthMs - (--slotList.end())->pollingTimeMs + currentTime;
|
||||||
}
|
}
|
||||||
// get previous slot
|
// get previous slot
|
||||||
slotListIter--;
|
slotListIter--;
|
||||||
@ -84,7 +84,7 @@ bool FixedSlotSequence::slotFollowsImmediately() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t FixedSlotSequence::getLengthMs() const {
|
uint32_t FixedSlotSequence::getLengthMs() const {
|
||||||
return this->slotLengthMs;
|
return this->lengthMs;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t FixedSlotSequence::checkSequence() const {
|
ReturnValue_t FixedSlotSequence::checkSequence() const {
|
||||||
|
@ -126,7 +126,7 @@ protected:
|
|||||||
*/
|
*/
|
||||||
SlotList slotList;
|
SlotList slotList;
|
||||||
|
|
||||||
uint32_t slotLengthMs;
|
uint32_t lengthMs;
|
||||||
|
|
||||||
bool isEmpty = false;
|
bool isEmpty = false;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user