def _onOffset(self, dt, businesshours):
<EOL>if self.n >= <NUM_LIT:0>:<EOL><INDENT>op = self._prev_opening_time(dt)<EOL><DEDENT>else:<EOL><INDENT>op = self._next_opening_time(dt)<EOL><DEDENT>span = (dt - op).total_seconds()<EOL>if span <= businesshours:<EOL><INDENT>return True<EOL><DEDENT>else:<EOL><INDENT>return False<EOL><DEDENT>
Slight speedups using calculated values.