Drop TimePeriod#FindNextTransition()

refs #7398
This commit is contained in:
Alexander A. Klimov 2020-02-26 14:01:44 +01:00
parent 31c4ba31b8
commit e813632ae2
2 changed files with 0 additions and 23 deletions

View File

@ -299,28 +299,6 @@ bool TimePeriod::IsInside(double ts) const
return false;
}
double TimePeriod::FindNextTransition(double begin)
{
ObjectLock olock(this);
Array::Ptr segments = GetSegments();
double closestTransition = -1;
if (segments) {
ObjectLock dlock(segments);
for (const Dictionary::Ptr& segment : segments) {
if (segment->Get("begin") > begin && (segment->Get("begin") < closestTransition || closestTransition == -1))
closestTransition = segment->Get("begin");
if (segment->Get("end") > begin && (segment->Get("end") < closestTransition || closestTransition == -1))
closestTransition = segment->Get("end");
}
}
return closestTransition;
}
void TimePeriod::UpdateTimerHandler()
{
double now = Utility::GetTime();

View File

@ -27,7 +27,6 @@ public:
bool GetIsInside() const override;
bool IsInside(double ts) const;
double FindNextTransition(double begin);
void ValidateRanges(const Lazy<Dictionary::Ptr>& lvalue, const ValidationUtils& utils) override;