function getStateAtTimeWithPeriod( t, period) {
    var onOrOff = (((int)(t / period)) % 2==1);
    return onOrOff;
  }