view bin/mpd_timing_test @ 929:c20c2eea6fce

another hack to stop graphfile from thinking its own new empty file means it should delete all the statements in that context Ignore-this: 94639afbbe8d3a0abd8a06e16922394f
author Drew Perttula <drewp@bigasterisk.com>
date Tue, 11 Jun 2013 20:25:02 +0000
parents a6f4a5b2647c
children 7772cc48e016
line wrap: on
line source

#!/usr/bin/python

"""
records times coming out of ascoltami

for example:

 % mpd_timing_test > timing
 # play some music in ascoltami, then ctrl-c
 % gnuplot
 > plot "timing" with lines

"""

import xmlrpclib, time

s = xmlrpclib.ServerProxy("http://localhost:8040")
start = time.time()
while 1:
    print time.time()-start,s.gettime()
    time.sleep(.01)