annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
1 import clock
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
2
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
3 # print clock.gettime()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
4 # clock.nanosleep(clock.timespec(1))
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
5 # print clock.gettime()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
6
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
7 # t = clock.gettime()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
8 # print t
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
9 # t.sec += 1
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
10 # print t
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
11 # clock.nanosleep(t, absolute=True)
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
12 # print clock.gettime()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
13
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
14 # t += 1
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
15 # print t
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
16
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
17 t = clock.gettime()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
18 print t
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
19 for x in range(10):
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
20 t.nsec += 10
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
21 print t
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
22 clock.nanosleep(t, absolute=True)