Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

log_utils.py 268 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
  1. def time_display(s):
  2. d = s // (3600*24)
  3. s -= d * (3600*24)
  4. h = s // 3600
  5. s -= h * 3600
  6. m = s // 60
  7. s -= m * 60
  8. str_time = "{:1d}d ".format(int(d)) if d else " "
  9. return str_time + "{:0>2d}:{:0>2d}:{:0>2d}".format(int(h), int(m), int(s))
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...