Spaces:
Running
Running
umyuu
commited on
Commit
ยท
271d94c
1
Parent(s):
3c90217
update version
Browse files- src/utils.py +7 -2
src/utils.py
CHANGED
@@ -2,11 +2,17 @@
|
|
2 |
import time
|
3 |
|
4 |
def get_package_version() -> str:
|
5 |
-
return '0.0.
|
6 |
|
7 |
class Stopwatch:
|
8 |
"""
|
9 |
Stopwatch ็ต้ๆ้ใ่จๆธฌใใใใใฎใฏใฉในใงใใ
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
"""
|
11 |
|
12 |
def __init__(self):
|
@@ -31,4 +37,3 @@ class Stopwatch:
|
|
31 |
end_time = time.perf_counter()
|
32 |
self._elapsed = end_time - self._start_time
|
33 |
return self._elapsed
|
34 |
-
|
|
|
2 |
import time
|
3 |
|
4 |
def get_package_version() -> str:
|
5 |
+
return '0.0.3'
|
6 |
|
7 |
class Stopwatch:
|
8 |
"""
|
9 |
Stopwatch ็ต้ๆ้ใ่จๆธฌใใใใใฎใฏใฉในใงใใ
|
10 |
+
Example:
|
11 |
+
from utils import Stopwatch
|
12 |
+
|
13 |
+
watch = Stopwatch.startNew()
|
14 |
+
# ่จๆธฌใใๅฆ็
|
15 |
+
print(f"{watch.stop():.3f}")
|
16 |
"""
|
17 |
|
18 |
def __init__(self):
|
|
|
37 |
end_time = time.perf_counter()
|
38 |
self._elapsed = end_time - self._start_time
|
39 |
return self._elapsed
|
|