Mercurial > hg > cc > cirrus_work
comparison bin/wprog.py @ 318:2502b81838da trim
for tracking progress (of w2c?)
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Tue, 13 Jan 2026 15:22:28 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 317:9450b557ccac | 318:2502b81838da |
|---|---|
| 1 #!/usr/bin/python3 | |
| 2 import sys, datetime | |
| 3 (s,d1,d2) = sys.argv[1:4] | |
| 4 dd2 = datetime.datetime.strptime(d2[4:22],"%b %d %I:%M:%S %p") | |
| 5 dd1 = datetime.datetime.strptime(d1[4:18],"%b %d %H:%M:%S") | |
| 6 d = (dd2 - dd1).seconds | |
| 7 h = d / 3600 | |
| 8 print("%.2f %d:%0.2d:%0.2d %.2f"%(a := float(s), | |
| 9 h, (m := (d % 3600)) / 60, m % 60, a / h)) |
