ARM: Add support for running multiple systems
[gem5.git] / src / dev / mc146818.cc
index 987b1bcd338680d009d31bb2c57a9f2b42a13963..b0aaf6e64db2eb188b9449e567049c9ea4ca606b 100644 (file)
  */
 
 #include <sys/time.h>
-#include <time.h>
 
+#include <ctime>
 #include <string>
 
 #include "base/bitfield.hh"
 #include "base/time.hh"
 #include "base/trace.hh"
+#include "debug/MC146818.hh"
 #include "dev/mc146818.hh"
 #include "dev/rtcreg.h"
 
@@ -216,7 +217,7 @@ MC146818::serialize(const string &base, ostream &os)
     //
     Tick rtcTimerInterruptTickOffset = event.when() - curTick();
     SERIALIZE_SCALAR(rtcTimerInterruptTickOffset);
-    Tick rtcClockTickOffset = event.when() - curTick();
+    Tick rtcClockTickOffset = tickEvent.when() - curTick();
     SERIALIZE_SCALAR(rtcClockTickOffset);
 }