changeset 54:c0b34039917a tip

Server: added an exposed function to log the start time of a performance (for log-to-audio sync)
author Mathieu Barthet <mathieu.barthet@eecs.qmul.ac.uk>
date Wed, 14 Oct 2015 19:20:08 +0100
parents 9e3579db2906
children
files mcserver/mcserver.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mcserver/mcserver.py	Thu May 14 12:35:40 2015 +0100
+++ b/mcserver/mcserver.py	Wed Oct 14 19:20:08 2015 +0100
@@ -4,6 +4,7 @@
 mcserver.py
 
 Created by George Fazekas on 2012-06-16.
+Modifications by Mathieu Barthet.
 Copyright (c) 2012 . All rights reserved.
 """
 
@@ -108,7 +109,12 @@
 		cp.log.error(str(map(lambda x: (x,"%.3f" % self.__dict__[x]),self.config_list)))
 		return str(map(lambda x: (x,"%.3f" % self.__dict__[x]),self.config_list)) #+ " Sessions: " + str(cp.tools.sessions)
 	
-
+	@cp.expose
+	def start(self):
+		timelog = "Performance start time: %s"%time.time()
+		print "Start function accessed."
+		cp.log.error(timelog)
+		return timelog
 
 
 def getProcessPids(port,kill=False):