Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wynwxst/stopwatch
An insanely simple stopwatch library
https://github.com/wynwxst/stopwatch
Last synced: 20 days ago
JSON representation
An insanely simple stopwatch library
- Host: GitHub
- URL: https://github.com/wynwxst/stopwatch
- Owner: wynwxst
- Created: 2022-02-28T01:39:05.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-01T04:40:34.000Z (almost 3 years ago)
- Last Synced: 2025-01-11T10:00:11.947Z (21 days ago)
- Language: Python
- Size: 10.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stopwatch
an insanely simple stopwatch library### Installation:
`pip install stpwch`### Usage:
```python
from main import StopWatch,utils
import times = StopWatch()
s.start()
time.sleep(5)print(str(s.duration))
print("bef pause ^")
s.pause()
time.sleep(5)
print(str(s.duration))
print("while pause ^")
s.unpause()
time.sleep(5)
print(str(s.duration))
print("after pause ^")
s.stop()
s.reset()
s.start()
time.sleep(2)
print(str(s.duration))
print("after reset ^")
print("now starting..")
s.start()
print("running: " + str(s.running))
time.sleep(1)
print(str(s.duration))
print("bef restart ^")
s.restart()
time.sleep(3)
print(str(s.duration))
print("after restart ^")
```### Development:
Install buildproj:`pip install buildproj`
`build`
In case of the binary not working:
`python buildbinary.py`
All processes are automated except for the sign in for pip, please be sure to also change the version and name in `setup.py
### Tests:
Install buildproj:`pip install buildproj`
`build test`
In case of the binary not working:
`python buildbinary.py test`