Mercurial > code > home > repos > light9
annotate bin/mpd_timing_test @ 1859:f066d6e874db
2to3 with these fixers: all idioms set_literal
Ignore-this: cbd28518218c2f0ddce8c4f92d3b8b33
author | drewp@bigasterisk.com |
---|---|
date | Wed, 22 May 2019 00:08:22 +0000 |
parents | 7772cc48e016 |
children |
rev | line source |
---|---|
247 | 1 #!/usr/bin/python |
2 """ | |
3 records times coming out of ascoltami | |
4 | |
5 for example: | |
6 | |
7 % mpd_timing_test > timing | |
8 # play some music in ascoltami, then ctrl-c | |
9 % gnuplot | |
10 > plot "timing" with lines | |
11 | |
12 """ | |
13 | |
1859
f066d6e874db
2to3 with these fixers: all idioms set_literal
drewp@bigasterisk.com
parents:
1858
diff
changeset
|
14 import xmlrpc.client, time |
247 | 15 |
1859
f066d6e874db
2to3 with these fixers: all idioms set_literal
drewp@bigasterisk.com
parents:
1858
diff
changeset
|
16 s = xmlrpc.client.ServerProxy("http://localhost:8040") |
247 | 17 start = time.time() |
1859
f066d6e874db
2to3 with these fixers: all idioms set_literal
drewp@bigasterisk.com
parents:
1858
diff
changeset
|
18 while True: |
f066d6e874db
2to3 with these fixers: all idioms set_literal
drewp@bigasterisk.com
parents:
1858
diff
changeset
|
19 print(time.time() - start, s.gettime()) |
247 | 20 time.sleep(.01) |