Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xUtil/Clooper/_ttest.sobin40624 -> 39840 bytes
-rw-r--r--Util/Clooper/ttest.c15
-rw-r--r--Util/Clooper/ttest.h5
-rw-r--r--scripts/olpc_get_stuff.sh2
4 files changed, 14 insertions, 8 deletions
diff --git a/Util/Clooper/_ttest.so b/Util/Clooper/_ttest.so
index 1e44d39..6b14ebe 100755
--- a/Util/Clooper/_ttest.so
+++ b/Util/Clooper/_ttest.so
Binary files differ
diff --git a/Util/Clooper/ttest.c b/Util/Clooper/ttest.c
index d18cace..9ff3d85 100644
--- a/Util/Clooper/ttest.c
+++ b/Util/Clooper/ttest.c
@@ -5,6 +5,7 @@
#include <unistd.h>
#include <sys/time.h>
+double sleeptime = 0.0;
int usleep(int);
static void * threadfn(void * _arg)
{
@@ -14,7 +15,8 @@ static void * threadfn(void * _arg)
}
struct timeval tv0, tv1;
double m = 0.0;
- double sleeptime = 0.05;
+
+ int loops = 0;
while (1)
{
@@ -23,7 +25,7 @@ static void * threadfn(void * _arg)
gettimeofday(&tv1, 0);
double t0 = pytime(&tv0);
double t1 = pytime(&tv1);
- if (t1 - t0 > 2.0 * sleeptime)
+ if (t1 - t0 > 1.2 * sleeptime)
{
fprintf(stderr, "critical lagginess %lf\n", t1 - t0);
}
@@ -32,12 +34,19 @@ static void * threadfn(void * _arg)
m = t1 - t0;
fprintf(stderr, "maximum lag %lf\n", m);
}
+
+ if ( ( loops % 100 ) == 0 )
+ {
+ fprintf(stderr, "loop (%lf)\n", t0);
+ }
+ ++loops;
}
return NULL;
}
-void testtimer()
+void testtimer(double st)
{
pthread_t pth;
+ sleeptime = st;
pthread_create( &pth, NULL, &threadfn, NULL );
}
diff --git a/Util/Clooper/ttest.h b/Util/Clooper/ttest.h
index a4ea56d..111f10c 100644
--- a/Util/Clooper/ttest.h
+++ b/Util/Clooper/ttest.h
@@ -1,14 +1,11 @@
#ifndef _MSL_MATH_H
#define _MSL_MATH_H
-#include <gsl/gsl_complex.h>
-typedef gsl_complex msl_complex_t;
-
#ifdef __cplusplus
extern "C" {
#endif
-void testtimer();
+void testtimer(double);
#ifdef __cplusplus
}
diff --git a/scripts/olpc_get_stuff.sh b/scripts/olpc_get_stuff.sh
index e2fb272..ebbd292 100644
--- a/scripts/olpc_get_stuff.sh
+++ b/scripts/olpc_get_stuff.sh
@@ -1,5 +1,5 @@
-yum install vim-common vim-enhanced screen git-core xterm fluxbox ctags irssi
+yum install vim-common vim-enhanced screen git-core xterm fluxbox ctags irssi gcc make python-devel
if [ ! -f ~/.Xdefaults ] ; then
#use a legible xterm font