def _set_cycle_time(self):
now = time()<EOL>try:<EOL><INDENT>cycle_time = now - self._cycle_time<EOL>if cycle_time < <NUM_LIT:0>:<EOL><INDENT>cycle_time = <NUM_LIT:0><EOL><DEDENT><DEDENT>except AttributeError:<EOL><INDENT>cycle_time = <NUM_LIT:0><EOL><DEDENT>cycle_time += self.cycle_time<EOL>if cycle_time == int(cycle_time):<EOL><INDENT>self._cycle_time = math.ceil(now + cycle_time)<EOL><DEDENT>else:<EOL><INDENT>self._cycle_time = math.ceil((now + cycle_time) * <NUM_LIT:10>) / <NUM_LIT:10><EOL><DEDENT>self._cycle_time = now + self.cycle_time<EOL>
Set next cycle update time synced to nearest second or 0.1 of second.