Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. import time
  2.  
  3. def uptime_command(self, c):
  4.     time_passed = int(time.time()) - self.start_time
  5.     hours = int(time_passed / (60*60))
  6.     if time_passed <= 60:
  7.         minutes = 0
  8.     else:
  9.         minutes = int(time_passed/60)%60
  10.     c.privmsg(self.channel, f"The stream has been up for {hours} hour(s) and {minutes} minute(s)")
  11.     time_passed = 0
  12.     minutes = 0
  13.     hours = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement