Change times to be relative to this experiment
[matches/MCTX3420.git] / server / actuator.c
index 3c09d05..425449c 100644 (file)
@@ -144,7 +144,7 @@ void Actuator_SetValue(Actuator * a, double value)
        struct timeval t;
        gettimeofday(&t, NULL);
 
-       DataPoint d = {TIMEVAL_DIFF(t, g_options.start_time), value};
+       DataPoint d = {TIMEVAL_DIFF(t, *Control_GetStartTime()), value};
        //TODO: Set actuator
        switch (a->id)
        {
@@ -212,7 +212,7 @@ void Actuator_Handler(FCGIContext * context, char * params)
 {
        struct timeval now;
        gettimeofday(&now, NULL);
-       double current_time = TIMEVAL_DIFF(now, g_options.start_time);
+       double current_time = TIMEVAL_DIFF(now, *Control_GetStartTime());
        int id = 0;
        double set = 0;
        double start_time = 0;

UCC git Repository :: git.ucc.asn.au