Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __timed_msg(self, defn, data, time_offset):
rollover = time_offset < self.__timestamp & 0x1f
self.__timestamp = (self.__timestamp & 0xffffffe0) + time_offset + (0x20 if rollover else 0)
return TimedMsg(defn, data, self.__timestamp)