mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
Added support for simulation time.
This allows control loops to behave more predictably in the face of the simulator running at non-realtime speeds. Change-Id: I3508ed7ad316a3bf8b2c54b68c93baaf8cc4d941 Closes: artf2607 Conflicts: wpilibc/wpilibC++Sim/include/Timer.h wpilibc/wpilibC++Sim/src/Utility.cpp
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
#include "Utility.h"
|
||||
|
||||
#include "HAL/cpp/StackTrace.hpp"
|
||||
#include <boost/date_time/posix_time/posix_time_types.hpp>
|
||||
#include "Task.h"
|
||||
#include "Timer.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -160,7 +160,6 @@ bool wpi_assertNotEqual_impl(int valueA,
|
||||
*/
|
||||
uint32_t GetFPGATime()
|
||||
{
|
||||
boost::posix_time::ptime time = boost::posix_time::microsec_clock::universal_time();
|
||||
return time.time_of_day().total_microseconds();
|
||||
return wpilib::internal::simTime * 1e6;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user