byzh-core 0.0.2.13__tar.gz → 0.0.2.14__tar.gz
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.
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/PKG-INFO +1 -1
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/Bterminal/cmd.py +1 -1
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/Btqdm/my_tqdm.py +1 -1
- byzh_core-0.0.2.14/byzh_core/Butils/__init__.py +7 -0
- byzh_core-0.0.2.14/byzh_core/Butils/timer.py +17 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/Bwriter/writer.py +1 -1
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/__init__.py +1 -1
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/obsolete/Bconfig/config.py +1 -1
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core.egg-info/PKG-INFO +1 -1
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core.egg-info/SOURCES.txt +3 -2
- byzh_core-0.0.2.13/byzh_core/Bbasic/__init__.py +0 -3
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/LICENSE +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/README.md +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/B_os.py +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/Barchive/__init__.py +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/Barchive/archive.py +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/Btable/__init__.py +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/Btable/auto_table.py +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/Bterminal/__init__.py +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/Btqdm/__init__.py +0 -0
- {byzh_core-0.0.2.13/byzh_core/Bbasic → byzh_core-0.0.2.14/byzh_core/Butils}/text_style.py +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/Bwriter/__init__.py +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/obsolete/Bconfig/__init__.py +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/obsolete/__init__.py +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/obsolete/auto_table.py +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/obsolete/row_table.py +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core/obsolete/xy_table.py +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core.egg-info/dependency_links.txt +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core.egg-info/requires.txt +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/byzh_core.egg-info/top_level.txt +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/setup.cfg +0 -0
- {byzh_core-0.0.2.13 → byzh_core-0.0.2.14}/setup.py +0 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
import time
|
2
|
+
class B_Timer:
|
3
|
+
def __init__(self):
|
4
|
+
self.start_time = 0
|
5
|
+
self.end_time = 0
|
6
|
+
|
7
|
+
def __enter__(self):
|
8
|
+
self.start_time = time.time()
|
9
|
+
return self
|
10
|
+
|
11
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
12
|
+
self.end_time = time.time()
|
13
|
+
print(f"[Timer] cost: {self.end_time - self.start_time:.4f}s")
|
14
|
+
|
15
|
+
if __name__ == '__main__':
|
16
|
+
with B_Timer():
|
17
|
+
time.sleep(2)
|
@@ -10,14 +10,15 @@ byzh_core.egg-info/requires.txt
|
|
10
10
|
byzh_core.egg-info/top_level.txt
|
11
11
|
byzh_core/Barchive/__init__.py
|
12
12
|
byzh_core/Barchive/archive.py
|
13
|
-
byzh_core/Bbasic/__init__.py
|
14
|
-
byzh_core/Bbasic/text_style.py
|
15
13
|
byzh_core/Btable/__init__.py
|
16
14
|
byzh_core/Btable/auto_table.py
|
17
15
|
byzh_core/Bterminal/__init__.py
|
18
16
|
byzh_core/Bterminal/cmd.py
|
19
17
|
byzh_core/Btqdm/__init__.py
|
20
18
|
byzh_core/Btqdm/my_tqdm.py
|
19
|
+
byzh_core/Butils/__init__.py
|
20
|
+
byzh_core/Butils/text_style.py
|
21
|
+
byzh_core/Butils/timer.py
|
21
22
|
byzh_core/Bwriter/__init__.py
|
22
23
|
byzh_core/Bwriter/writer.py
|
23
24
|
byzh_core/obsolete/__init__.py
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|