From 14df28d5b8d3d9d80f24c532e1c096f8ac997e5b Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Sat, 9 Nov 2024 18:49:40 +0100 Subject: Added the random name generation to be part of the package --- src/match_up/utilities.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/match_up/utilities.py') diff --git a/src/match_up/utilities.py b/src/match_up/utilities.py index 7a9d55d..8a905ba 100644 --- a/src/match_up/utilities.py +++ b/src/match_up/utilities.py @@ -1,10 +1,11 @@ -from os import getenv from time import time from typing import Tuple from random import shuffle from dataclasses import dataclass + SECS_IN_MIN = 60 +DEFAULT_TIMER = 12.0 def _shuffle_two_lists(a: list, b: list) -> Tuple[list, list]: @@ -30,9 +31,9 @@ def sample_list(indices: list, cost: list[int], count: int = None) -> list: @dataclass class Timer: + max_mins: float = DEFAULT_TIMER ref: float = None running: bool = False - max_mins: float = float(getenv("TIMER")) default: str = ("00", "00") def __post_init__(self): -- cgit v1.3.1