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.4.tar.gz
(2.1 kB
view hashes)
Built Distribution
Close
Hashes for convert_ms-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 699d01e796f613c9a3714737947defd8d1d0f691073b805938b3b3ddc4541c30 |
|
MD5 | 8c8020a4f8e43ce53fd7bd561ab0443f |
|
BLAKE2b-256 | e4eae05868318e4ed622907022083e125c9a3cf46344c9bee5861c10d7388252 |