Timestamp manager
Project description
Timestamp
Build Status
Install
In order to install, you can either use pypi with either
pip3 install timestamps
or
python3 -m pip install timestamps
Usage
The library has several types defined
Timestamp
Represents a timestamp with a 10^-7 precision (same as the time.time() of python 3) You can instanciate it in various ways, each time, you can provide a non-keyword value or a value with as keyword either _float, _hex or _datetime, or with the methods from_float, from_hex and from_datetime
# With a float
t = Timestamp(1.0)
t = Timestamp.from_float(1.0)
t = Timestamp(_float=1.0) # WARNING: Discouraged, use Timestamp.from_float instead
# With a datetime
t = Timestamp(datetime.datetime.now())
t = Timestamp.from_datetime(datetime.datetime.now())
t = Timestamp(_datetime=datetime.datetime.now()) # WARNING: Discouraged, use Timestamp.from_datetime instead
# With an hex
t = Timestamp(_hex='f') # WARNING: Discouraged, use Timestamp.from_hex instead
t = Timestamp('0xf0')
t = Timestamp.from_hex('#FF')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
timestamps-1.1.0.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for timestamps-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 613a4164409bc080451d1356f0822aa9e29a5b4b8d4274507dba3db95940a05b |
|
MD5 | bd5ebe9224d3a85047a969667bb1c0a1 |
|
BLAKE2b-256 | ab5cd2901a8cf7382824aef57df0662d2dee61d3f09e7c01a44f06992b962dfd |