Merge zizzer:/bk/m5 into zeep.eecs.umich.edu:/z/saidi/work/m5
[gem5.git] / sim / stat_control.cc
index 28ee348b5b149e3c0f3bb1541cc41dcfbf78cf57..8a8eaa7907e3926fd9ba69788c30aa9f004ed912 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2004 The Regents of The University of Michigan
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -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")
         ;