]> rtime.felk.cvut.cz Git - frescor/fosa.git/blobdiff - src_marte/tests/test_cpu_clocks/test_cpu_clocks.c
Updating FOSA tests of CPU clocks
[frescor/fosa.git] / src_marte / tests / test_cpu_clocks / test_cpu_clocks.c
index 164a6d45a4039a8165dff6d441d7c83f0f074507..9dbf63cd1117d58e03fcd2e0adb8d5d7da7395ee 100644 (file)
@@ -36,7 +36,7 @@ int main ()
 
     frsh_signal_t signal_received;
     frsh_signal_info_t info_programmed, info_received;
-
+    struct timespec work_interval = {3, 200000000}; // 3.2 seconds
     fosa_clock_id_t clockid;
     fosa_timer_id_t timerid;
 
@@ -109,7 +109,8 @@ int main ()
     /* We execute a little bit to ensure that execution time */
     /* and real time differ                                  */
     /*********************************************************/
-    
+    printf("Main works for some time...\n");
+    frsh_eat(&work_interval);
 
     /* Now we do the wait in order to allow the thread to run */
     /**********************************************************/
@@ -160,5 +161,6 @@ static void * thread_body(void *thread_arg)
         printf("Elapsed time:  %d %d\n", after_work_time.tv_sec,
                after_work_time.tv_nsec);
     } // while
+    return NULL;
 }