]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/train.h
Make the simulation independent of wall clock time
[r2c2.git] / source / libr2c2 / train.h
index e3eebe1fc5d050d2d3b2a230eaa332416c909a1f..c0eb52e850006cd4ca48f41f1ad35dd77da227f3 100644 (file)
@@ -4,7 +4,7 @@
 #include <sigc++/signal.h>
 #include <sigc++/trackable.h>
 #include <msp/datafile/objectloader.h>
-#include <msp/time/timestamp.h>
+#include <msp/time/timedelta.h>
 #include "blockallocator.h"
 #include "controller.h"
 #include "sensor.h"
@@ -60,11 +60,11 @@ private:
        unsigned current_speed_step;
        bool speed_changing;
        bool reverse;
-       Msp::Time::TimeStamp stop_timeout;
+       Msp::Time::TimeDelta stop_timeout;
        unsigned functions;
 
        BlockIter last_entry_block;
-       Msp::Time::TimeStamp last_entry_time;
+       Msp::Time::TimeDelta travel_time;
        bool pure_speed;
        SpeedQuantizer *speed_quantizer;
        bool accurate_position;
@@ -123,7 +123,7 @@ public:
        const BlockAllocator &get_block_allocator() const { return allocator; }
        float get_reserved_distance() const;
 
-       void tick(const Msp::Time::TimeStamp &, const Msp::Time::TimeDelta &);
+       void tick(const Msp::Time::TimeDelta &);
 
        void save(std::list<Msp::DataFile::Statement> &) const;
 private: