You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
378 B

  1. import sys
  2. def main():
  3. ts = None
  4. while 1:
  5. b = sys.stdin.readline()
  6. if b == "": break
  7. f = b.split()
  8. if len(f) != 2: continue
  9. newts = int(f[0])
  10. event = f[1]
  11. if ts is None:
  12. ts = int(f[0])
  13. else:
  14. print "%8d %s" % (newts - ts, event)
  15. ts = newts
  16. return 0
  17. sys.exit(main())