Mercurial > hg > cc > cirrus_work
view bin/wprog.py @ 361:97e049b06f69 plus
remove unused imports and declarations,
compute FILENO and SEG properly,
move local offset to global OFFSET so it's available for the 2nd callback
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Thu, 19 Mar 2026 17:21:51 +0000 |
| parents | 2502b81838da |
| children |
line wrap: on
line source
#!/usr/bin/python3 import sys, datetime (s,d1,d2) = sys.argv[1:4] dd2 = datetime.datetime.strptime(d2[4:22],"%b %d %I:%M:%S %p") dd1 = datetime.datetime.strptime(d1[4:18],"%b %d %H:%M:%S") d = (dd2 - dd1).seconds h = d / 3600 print("%.2f %d:%0.2d:%0.2d %.2f"%(a := float(s), h, (m := (d % 3600)) / 60, m % 60, a / h))
