Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # produce formatted hh:mm:ss.sss timestamp from timestamp_cycles
- timestamp_ms = timestamp_cycles // 200000
- timestamp_s = ( timestamp_ms % 60000 ) / 1000
- timestamp_m = timestamp_ms // 60000
- timestamp_h = timestamp_m // 60
- timestamp_m = timestamp_m % 60
- timestamp = f'{timestamp_h:02d}:{timestamp_m:02d}:{timestamp_s:06.3f}'
- # produce formatted h:mm:ss.ssssss timestamp from timestamp_cycles
- from datetime import timedelta
- timestamp = f'{timedelta(microseconds=timestamp_cycles // 200)}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement