Advertisement
Guest User

vusb-analyzer-1.2

a guest
Sep 30th, 2012
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.41 KB | None | 0 0
  1. diff -cr ./vusb-analyzer-1.1/VUsbTools/Log.py ./vusb-analyzer-1.2/VUsbTools/Log.py
  2. *** ./vusb-analyzer-1.1/VUsbTools/Log.py    2009-12-04 00:02:21.000000000 +0300
  3. --- ./vusb-analyzer-1.2/VUsbTools/Log.py    2012-09-28 00:12:58.345196791 +0400
  4. ***************
  5. *** 201,215 ****
  6.              """
  7.           # Cache the results of strptime. It only changes every
  8.           # second, and this was taking more than 50% of our parsing time!
  9. !         stamp = line[:15]
  10.           savedStamp, parsed = self._timeCache
  11.           if savedStamp != stamp:
  12. !             parsed = time.strptime(stamp, "%b %d %H:%M:%S")
  13.               self._timeCache = stamp, parsed
  14.  
  15.           now = time.localtime()
  16.           try:
  17. !             usec = int(line[16:19])
  18.           except ValueError:
  19.               usec = 0
  20.           return usec / 1000.0 + time.mktime((
  21. --- 201,215 ----
  22.              """
  23.           # Cache the results of strptime. It only changes every
  24.           # second, and this was taking more than 50% of our parsing time!
  25. !         stamp = line[:19]
  26.           savedStamp, parsed = self._timeCache
  27.           if savedStamp != stamp:
  28. !             parsed = time.strptime(stamp, "%Y-%m-%dT%H:%M:%S")
  29.               self._timeCache = stamp, parsed
  30.  
  31.           now = time.localtime()
  32.           try:
  33. !             usec = int(line[20:23])
  34.           except ValueError:
  35.               usec = 0
  36.           return usec / 1000.0 + time.mktime((
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement