Mercurial > hg > python-clock
view test.py @ 0:1c0396a8fff4 default tip
Import
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Fri, 03 Jul 2015 21:00:16 +0200 |
parents | |
children |
line wrap: on
line source
import clock # print clock.gettime() # clock.nanosleep(clock.timespec(1)) # print clock.gettime() # t = clock.gettime() # print t # t.sec += 1 # print t # clock.nanosleep(t, absolute=True) # print clock.gettime() # t += 1 # print t t = clock.gettime() print t for x in range(10): t.nsec += 10 print t clock.nanosleep(t, absolute=True)