Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -cr ./vusb-analyzer-1.1/VUsbTools/Log.py ./vusb-analyzer-1.2/VUsbTools/Log.py
- *** ./vusb-analyzer-1.1/VUsbTools/Log.py 2009-12-04 00:02:21.000000000 +0300
- --- ./vusb-analyzer-1.2/VUsbTools/Log.py 2012-09-28 00:12:58.345196791 +0400
- ***************
- *** 201,215 ****
- """
- # Cache the results of strptime. It only changes every
- # second, and this was taking more than 50% of our parsing time!
- ! stamp = line[:15]
- savedStamp, parsed = self._timeCache
- if savedStamp != stamp:
- ! parsed = time.strptime(stamp, "%b %d %H:%M:%S")
- self._timeCache = stamp, parsed
- now = time.localtime()
- try:
- ! usec = int(line[16:19])
- except ValueError:
- usec = 0
- return usec / 1000.0 + time.mktime((
- --- 201,215 ----
- """
- # Cache the results of strptime. It only changes every
- # second, and this was taking more than 50% of our parsing time!
- ! stamp = line[:19]
- savedStamp, parsed = self._timeCache
- if savedStamp != stamp:
- ! parsed = time.strptime(stamp, "%Y-%m-%dT%H:%M:%S")
- self._timeCache = stamp, parsed
- now = time.localtime()
- try:
- ! usec = int(line[20:23])
- except ValueError:
- usec = 0
- return usec / 1000.0 + time.mktime((
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement