summaryrefslogtreecommitdiffhomepage
path: root/ir/stat
diff options
context:
space:
mode:
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>2013-07-08 15:43:16 +0200
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>2013-07-08 15:43:16 +0200
commit8c5b2f49e4791d7d9088110e498dd00e0afecc07 (patch)
treee42a99ac0dcbca5de632b325a19f0f79ed82d5e4 /ir/stat
parentcdbc2a0cd2c5cf2af4cf5f405fda7032ec99f737 (diff)
Fixed wrong computation of start timer.
Diffstat (limited to 'ir/stat')
-rw-r--r--ir/stat/statev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/stat/statev.c b/ir/stat/statev.c
index f3e64ee..343f6fb 100644
--- a/ir/stat/statev.c
+++ b/ir/stat/statev.c
@@ -67,14 +67,14 @@ void stat_ev_tim_push(void)
int sp = stat_ev_timer_sp++;
assert((size_t)sp < ARRAY_SIZE(stat_ev_timer_start));
timing_ticks_t temp = timing_ticks();
+ stat_ev_timer_elapsed[sp] = 0;
+ stat_ev_timer_start[sp] = temp;
if (sp == 0) {
timing_enter_max_prio();
} else {
temp -= stat_ev_timer_start[sp-1];
stat_ev_timer_elapsed[sp-1] += temp;
}
- stat_ev_timer_elapsed[sp] = 0;
- stat_ev_timer_start[sp] = temp;
}
void stat_ev_tim_pop(const char *name)