Add state saving functions and update processTrace accordingly.
[lttv.git] / ltt / branches / poly / lttv / stats.c
index 311658c1141443ee5823016940e956a42e2ce393..eaa2041ceb5485cf969581f14161584d5578d971 100644 (file)
@@ -327,9 +327,9 @@ static void mode_change(LttvTracefileStats *tfcs)
 
   lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_CPU_TIME, 
       LTTV_TIME, &cpu_time);
-  TimeSub(delta, tfcs->parent.parent.timestamp, 
+  delta = ltt_time_sub(tfcs->parent.parent.timestamp, 
       tfcs->parent.process->state->change);
-  TimeAdd(*(cpu_time.v_time), *(cpu_time.v_time), delta);
+  *(cpu_time.v_time) = ltt_time_add(*(cpu_time.v_time), delta);
 }
 
 
@@ -341,15 +341,15 @@ static void mode_end(LttvTracefileStats *tfcs)
 
   lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_ELAPSED_TIME, 
       LTTV_TIME, &elapsed_time);
-  TimeSub(delta, tfcs->parent.parent.timestamp, 
+  delta = ltt_time_sub(tfcs->parent.parent.timestamp, 
       tfcs->parent.process->state->entry);
-  TimeAdd(*(elapsed_time.v_time), *(elapsed_time.v_time), delta);
+  *(elapsed_time.v_time) = ltt_time_add(*(elapsed_time.v_time), delta);
 
   lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_CPU_TIME, 
       LTTV_TIME, &cpu_time);
-  TimeSub(delta, tfcs->parent.parent.timestamp, 
+  delta = ltt_time_sub(tfcs->parent.parent.timestamp, 
       tfcs->parent.process->state->change);
-  TimeAdd(*(cpu_time.v_time), *(cpu_time.v_time), delta);
+  *(cpu_time.v_time) = ltt_time_add(*(cpu_time.v_time), delta);
 }
 
 
This page took 0.023819 seconds and 4 git commands to generate.