-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
40 lines (29 loc) · 1 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
ACCURATE TIME
=============
This module defines an AccurateTime object for storing arbitrary precision
floating point posix time while keeping the same information as a standard
datetime object, keeping consistency between the two
INSTALLATION
============
You are free to clone the public git repo as::
$ git clone git://github.com/flyingfrog81/accuratetime.git
$ cd accuratetime
$ python setup.py install
Or you can install using PyPI as::
$ pip install accuratetime
USAGE
=====
>>> import accuratetime
>>> import time
>>> t_zero = accuratetime.now()
>>> time.sleep(3.5)
>>> t_uno = accuratetime.now()
>>> t_delta_datetime = t_uno.datetime - t_zero.datetime
>>> t_zero.datetime += t_delta_datetime
>>> t_zero.accurate_posix == t_uno.accurate_posix
True
>>> t_uno = accuratetime.now()
>>> t_delta_posix = t_uno.accurate_posix - t_zero.accurate_posix
>>> t_zero.accurate_posix += t_delta_posix
>>> t_zero.datetime == t_uno.datetime
True