Add portal uptime to @time command.

This commit is contained in:
Tehom 2018-10-18 04:24:03 -04:00
parent 1f3d8d1b96
commit 040cc2aa9f
6 changed files with 20 additions and 1 deletions

View file

@ -107,6 +107,17 @@ def uptime():
return time.time() - SERVER_START_TIME
def portal_uptime():
"""
Get the current uptime of the portal.
Returns:
time (float): The uptime of the portal.
"""
from evennia.server.sessionhandler import SESSIONS
return time.time() - SESSIONS.portal_start_time
def game_epoch():
"""
Get the game epoch.