]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
timing: output trace format changed (only for file output for now)
authorMartin Zidek <zidekm1@gmail.com>
Wed, 20 May 2009 21:24:51 +0000 (23:24 +0200)
committerMartin Zidek <zidekm1@gmail.com>
Wed, 20 May 2009 21:24:51 +0000 (23:24 +0200)
src/timing/timing.c

index 4cfc66fa617763c72f3da5c41d172a68b66d6ad6..eae74a1b005cfbeb917a0569c71a4cddee25a5d9 100644 (file)
@@ -45,6 +45,7 @@ bool timestamp_enabled = true;
 static int cnt=0;
 struct timespec meas_start_ts;
 FILE *file;
+static pid_t pid=-1;
 
 void timing_statistics_asm(void);
 void timing_output_trace_screen(void);
@@ -132,7 +133,7 @@ void print_tstamp_to_schedclock(timestamp_t *ts)
        printf("%d %5lu.%06lu\n", ts->id, sec, usec);
 #endif
 #ifdef CONFIG_TIMING_OUTPUT_FILE
-       fprintf(file, "%d:%5lu.%06lu:%llu\n", ts->id, sec, usec, tb);
+       fprintf(file, "%5lu.%06lu\t%d\t%d\tR\t%llu\n", sec, usec, pid, ts->id, tb);
 #endif
 }
 #endif
@@ -428,3 +429,7 @@ void timing_statistics_clock_gettime(void)
 }
 #endif
 
+void timing_set_pid(pid_t set_pid)
+{
+       pid = set_pid;
+}