Mercurial > hg > python-clock
diff 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 diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test.py Fri Jul 03 21:00:16 2015 +0200 @@ -0,0 +1,22 @@ +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)