From 7fe40f61c518f1c2f83f58186a3c4b845ce251d5 Mon Sep 17 00:00:00 2001 From: mono <5990186+mononobi@users.noreply.github.com> Date: Sun, 19 Feb 2023 23:03:09 +0330 Subject: [PATCH] Add drawing duration info --- src/drawpia/manager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/drawpia/manager.py b/src/drawpia/manager.py index a5b3792..d836779 100644 --- a/src/drawpia/manager.py +++ b/src/drawpia/manager.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +import time import random from drawpia.extractor import Extractor, Entry @@ -328,9 +329,13 @@ def perform(self): """ self._confirm() + start = time.time() groups = self._draw() + end = time.time() + duration = '{:0.2f}'.format((end - start) * 1000) print('*' * 200) print('Performing The Draw...') + print(f'Drawing took [{duration}] ms') print('*' * 200) print('Draw Results:') for item in groups: