// there is something to do even when subPeriod = 0
subPeriodPattern.fillInSubPeriod(subPeriod, tp);
}
// make sure nothing is negative
if (tp.anyNegative())
throw new RuntimeException(String.format("(bug) time=%d %s", time, tp.toString()));
return tp;
}