Convert a time units to seconds
Project description
Convert_ms
- Use this package for converting units of time to seconds.
What is it?
from convert_ms import ms, check
ms("1m") # return 60
ms("1h") # return 3600
ms("1d") # return 86400
check("1m") # return True
check("1o") # return False
How to use ?
from convert_ms import ms, check
import asyncio
duration = "1h"
if check(query=duration):
await asyncio.sleep(ms(query=duration))
else:
print("you have entered a non-existent unit of time")
Formats
seconds, secs, s, m, min, minute, h, hour, d, day, w, week, mon, month, y, year
Find a bug?
Report here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
convert_ms-0.0.5.tar.gz
(2.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file convert_ms-0.0.5.tar.gz.
File metadata
- Download URL: convert_ms-0.0.5.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c38dd00ddea94659733a1aa2cd144428da86072d8b0433eb8ea8ee56c807793a
|
|
| MD5 |
c6e3c1eafc663c635d1e8e410044f081
|
|
| BLAKE2b-256 |
80880c94ce77125de6ca9e778f3733402ac7a022c33c1b3660a2b162c9c5abfc
|
File details
Details for the file convert_ms-0.0.5-py3-none-any.whl.
File metadata
- Download URL: convert_ms-0.0.5-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9747b87ebb51db5af327052996a056c7392dffb7dcd0f344ab2121f88af93a04
|
|
| MD5 |
1283b43cbb43e71781603c043a6271f2
|
|
| BLAKE2b-256 |
c7a6ac751b9e3b597b124d2246650a0caa10d2bb7d073d4b7f8d2aa3f5b2bbad
|