summaryrefslogtreecommitdiff
path: root/sim/stat_control.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sim/stat_control.cc')
-rw-r--r--sim/stat_control.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/sim/stat_control.cc b/sim/stat_control.cc
index 9a4313a61..8a8eaa790 100644
--- a/sim/stat_control.cc
+++ b/sim/stat_control.cc
@@ -80,6 +80,12 @@ statElapsedTime()
return elapsed();
}
+Tick
+statElapsedTicks()
+{
+ return curTick - startTick;
+}
+
SimTicksReset simTicksReset;
void
@@ -105,7 +111,7 @@ InitSimStats()
;
simTicks
- .scalar(curTick)
+ .functor(statElapsedTicks)
.name("sim_ticks")
.desc("Number of ticks simulated")
;