diff core/ClockSyncThread.cpp @ 139:4e2dd3eb1d28 ClockSync

The reported offset is now meaningful. The whole thing is waaay too jittery.
author Giulio Moro <giuliomoro@yahoo.it>
date Sun, 13 Sep 2015 21:34:47 +0100
parents e77e2e712fbc
children 44d07fa9bd03
line wrap: on
line diff
--- a/core/ClockSyncThread.cpp	Sun Sep 13 21:33:01 2015 +0100
+++ b/core/ClockSyncThread.cpp	Sun Sep 13 21:34:47 2015 +0100
@@ -31,7 +31,7 @@
 	startThread(5);
 #else
 	threadIsExiting=false;
-	clockSyncTask=BeagleRT_createAuxiliaryTask(&ClockSyncThread::run,98, "clockSyncTask");
+	clockSyncTask=BeagleRT_createAuxiliaryTask(&ClockSyncThread::run,60, "clockSyncTask");
 	//TODO: the thread cannot be started here at the moment because init() is called in setup(), where tasks cannot be scheduled
 #endif /* USE_JUCE */
 }
@@ -58,9 +58,8 @@
 void ClockSyncThread::run(){
 	while(!threadShouldExit()){
 		clockSync.sendReceiveLoop();
-		usleep(5000);
 //		double now=virtualClock->getNow();
-//		printf("th(end+1)=%f;\n", now/44100.0f);
+//		printf("th(end+1)=%f;\n", now);
 //		printf("act(end+1)=%lld;\n", Clock::getTimeUs());
 	}
 	printf("Thread is not running \n");