Skip to content

Commit

Permalink
Implement BeRightBackStart timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamscached committed Nov 5, 2022
1 parent 46542c2 commit 19ae581
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config/default/configs/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ SmallText = Doki Doki Literature Club
# Beginning timestamp, displays as 'XX:XX:XX elapsed' on activity block.
# Currently, the following values are supported:
# * SessionStart - timestamp of current session start.
# * LastPresenceUpdate - timestamp of last presence update occurreed.
# * LastPresenceUpdate - timestamp of last presence update occurred.
# * BeRightBackStart - timestamp of be right back beginning.
# * None - disable start timestamp.
Start = SessionStart

Expand Down
12 changes: 10 additions & 2 deletions mod/config.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,16 @@ init 90 python in _fom_presence_config:
timestamps_db["sessionstart"] = util.Supplier(_timestamp_session_start)

def _timestamp_brb_start():
brb_ev = store.mas_getEV(brb_evl)
return brb_ev and brb_ev.last_seen
"""
Supplier that provides timestamp of when be right back has started.
OUT:
int:
Unix timestamp of be right back beginning.
"""

brb_ev = store.mas_getEV(store.mas_globals.last_label)
return _datetime_to_int(brb_ev.last_seen)
timestamps_db["berightbackstart"] = util.Supplier(_timestamp_session_start)

def _timestamp_last_update():
Expand Down

0 comments on commit 19ae581

Please sign in to comment.