Add portal uptime to @time command.
This commit is contained in:
parent
1f3d8d1b96
commit
040cc2aa9f
6 changed files with 20 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue