bluer-options 5.159.1__py3-none-any.whl → 5.162.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bluer_options/__init__.py +1 -1
- bluer_options/timer.py +15 -0
- {bluer_options-5.159.1.dist-info → bluer_options-5.162.1.dist-info}/METADATA +1 -1
- {bluer_options-5.159.1.dist-info → bluer_options-5.162.1.dist-info}/RECORD +7 -7
- {bluer_options-5.159.1.dist-info → bluer_options-5.162.1.dist-info}/WHEEL +0 -0
- {bluer_options-5.159.1.dist-info → bluer_options-5.162.1.dist-info}/licenses/LICENSE +0 -0
- {bluer_options-5.159.1.dist-info → bluer_options-5.162.1.dist-info}/top_level.txt +0 -0
bluer_options/__init__.py
CHANGED
bluer_options/timer.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import time
|
|
2
|
+
|
|
2
3
|
from bluer_options import string
|
|
4
|
+
from bluer_options.logger import logger
|
|
3
5
|
|
|
4
6
|
|
|
5
7
|
class Timer:
|
|
@@ -7,6 +9,7 @@ class Timer:
|
|
|
7
9
|
self,
|
|
8
10
|
period: int,
|
|
9
11
|
name: str,
|
|
12
|
+
log: bool = False,
|
|
10
13
|
):
|
|
11
14
|
self.count = 0
|
|
12
15
|
self.hot = False
|
|
@@ -15,6 +18,18 @@ class Timer:
|
|
|
15
18
|
self.name = name
|
|
16
19
|
self.start_time = time.time()
|
|
17
20
|
|
|
21
|
+
if log:
|
|
22
|
+
logger.info(
|
|
23
|
+
"{}: {} every {}.".format(
|
|
24
|
+
self.__class__.__name__,
|
|
25
|
+
name,
|
|
26
|
+
string.pretty_duration(
|
|
27
|
+
period,
|
|
28
|
+
include_ms=True,
|
|
29
|
+
),
|
|
30
|
+
)
|
|
31
|
+
)
|
|
32
|
+
|
|
18
33
|
def reset(self):
|
|
19
34
|
self.hot = False
|
|
20
35
|
self.last_hot = time.time()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
bluer_options/__init__.py,sha256=
|
|
1
|
+
bluer_options/__init__.py,sha256=XCocAjniJkB01BG0-9PbE-GlcZgnNHWi0HtEW2tZOYQ,288
|
|
2
2
|
bluer_options/__main__.py,sha256=-6ce9W1uXkle4YtEYlSUMWxSmsur3dRDA4_MvNNhEVg,236
|
|
3
3
|
bluer_options/config.env,sha256=2AG3xuWiMqaNmlCNDWQOJ_AssKk7KXhn0XDIkHWNQ2Q,30
|
|
4
4
|
bluer_options/elapsed_timer.py,sha256=46e-g-bjC7J4hGOGKD12R90ficXzFYn84xlLX6l34I8,545
|
|
5
|
-
bluer_options/timer.py,sha256=
|
|
5
|
+
bluer_options/timer.py,sha256=UPmsfCjbEWpcjXgMpYemXieheMJH_UpuemhVGsKYVoE,2470
|
|
6
6
|
bluer_options/urls.py,sha256=paHaYlLMQOI46-EYNch5ohu9Q09BMkF2vvJy1QufrVI,19
|
|
7
7
|
bluer_options/.bash/alias.sh,sha256=8-t6sTIy3YjyMkFLArRc45U1lNBWWmG0dIhYuN3-wRo,890
|
|
8
8
|
bluer_options/.bash/assert.sh,sha256=3QvFWBS0-fyodXR7ZWIx5rCtQilrlV3r5zXQ8AZmsFg,1677
|
|
@@ -63,8 +63,8 @@ bluer_options/string/functions.py,sha256=cvP4_b0CUk3xXWLTpqy17NOw8ldiiUx3GLpggap
|
|
|
63
63
|
bluer_options/terminal/__init__.py,sha256=kyNhbC5NVCuqrUhbbTeAOTW1ZO7MRRbi0RtXGBFKtJc,73
|
|
64
64
|
bluer_options/terminal/__main__.py,sha256=3o465bp44c2f1KHDn4j664hpbvu8wKOwQ2c1OPoa6Xc,902
|
|
65
65
|
bluer_options/terminal/functions.py,sha256=A23uHLeU4JIctmecOFk_KhIfOeHu-WMjnSzBj2KiF3U,1947
|
|
66
|
-
bluer_options-5.
|
|
67
|
-
bluer_options-5.
|
|
68
|
-
bluer_options-5.
|
|
69
|
-
bluer_options-5.
|
|
70
|
-
bluer_options-5.
|
|
66
|
+
bluer_options-5.162.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
|
|
67
|
+
bluer_options-5.162.1.dist-info/METADATA,sha256=_tm4RLSYPOLrncZveWkbcGXwt8tJPG4incvJgjQMnYw,4951
|
|
68
|
+
bluer_options-5.162.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
69
|
+
bluer_options-5.162.1.dist-info/top_level.txt,sha256=yw9slt8n3R7IiYmf83OtHtB8Z-EgP9UwyQTk1EGiAJU,14
|
|
70
|
+
bluer_options-5.162.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|