1
0
Fork 0
mirror of synced 2024-05-19 12:02:54 +12:00
Rare/rare/utils/metrics.py
loathingKernel c0ac23b21d
Ubisoft: Update Ubisoft redemption widget to use RareCore
* Load and populate Ubisoft information when the page is shown instead of startup.
* List all Ubisoft games, and differentiate based on whether they been redeemed.
2023-11-28 17:15:45 +02:00

11 lines
252 B
Python

import time
from contextlib import contextmanager
from logging import Logger
@contextmanager
def timelogger(logger: Logger, title: str):
start = time.perf_counter()
yield
logger.debug("%s: %s seconds", title, time.perf_counter() - start)