TimeBounds constructor

TimeBounds(
  1. int minTime,
  2. int maxTime
)

Constructor minTime and maxTime are 64bit Unix timestamps.

Implementation

TimeBounds(int minTime, int maxTime) {
  if (minTime < 0) {
    throw Exception("minTime cannot be negative");
  }

  if (maxTime < 0) {
    throw new Exception("maxTime cannot be negative");
  }
  if (maxTime != 0 && minTime >= maxTime) {
    throw Exception("minTime must be >= maxTime");
  }

  _mMinTime = minTime;
  _mMaxTime = maxTime;
}