Spaces:
Runtime error
Runtime error
File size: 619 Bytes
62a652e c659c53 62a652e e06ca3e 62a652e 647ff2a e06ca3e 62a652e e06ca3e 62a652e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
from datetime import datetime
class PlayerActivity():
def __init__(self) -> None:
self.player_backend_user_id = None
self.login_timestamp = datetime.now()
self.rendered_timestamp = None
def render_finished(self, player_info):
self.player_backend_user_id = player_info['player_backend_user_id']
self.rendered_timestamp = datetime.now()
def to_dict(self):
return {
'player_backend_user_id': self.player_backend_user_id,
'login_timestamp': self.login_timestamp,
'rendered_timestamp': self.rendered_timestamp
}
|