Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __data_msg(self, defn, data):
if defn.timestamp_field:
field = defn.timestamp_field
self.__timestamp = self.__parse_date.parse(data[field.start:field.finish], 1, defn.endian)[0]
# include timestamp here so that things like laps can be correlated with timed data
return DataMsg(defn, data, self.__timestamp)