You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 15, 2019. It is now read-only.
I was wondering, maybe uptime as an information variable should be a standard in the library. The library itself has a the ability to make a connection. If this was the case, even when integrating with something like the bot, all the bot would have to do would be to interpret the uptime.
The uptime does not have to be given in a particular format, maybe just plainly as seconds or raw time.time(). Any other application using the library can interpret it in the way it wants. You usually see client connection or actual uptime as default information on a variety of interfaces now, so I was placing the idea.
The text was updated successfully, but these errors were encountered:
def get_runtime(self, milliseconds=True):
"""
Get the time the connection has been alive.
:param milliseconds: bool True return the time as milliseconds, False return seconds.
:return: int milliseconds or seconds.
"""
up = int(time.time() - self._init_time)
if milliseconds:
return up * 1000
return up
I was wondering, maybe uptime as an information variable should be a standard in the library. The library itself has a the ability to make a connection. If this was the case, even when integrating with something like the bot, all the bot would have to do would be to interpret the uptime.
The uptime does not have to be given in a particular format, maybe just plainly as seconds or raw time.time(). Any other application using the library can interpret it in the way it wants. You usually see client connection or actual uptime as default information on a variety of interfaces now, so I was placing the idea.
The text was updated successfully, but these errors were encountered: