Merge "Simplified joystick reader."
diff --git a/aos/common/util/phased_loop.h b/aos/common/util/phased_loop.h
index d231449..f3c417a 100644
--- a/aos/common/util/phased_loop.h
+++ b/aos/common/util/phased_loop.h
@@ -10,8 +10,6 @@
 // Will not be accurate if ms isn't a factor of 1000.
 // offset is in us.
 void PhasedLoopXMS(int ms, int offset);
-// offset is in us.
-inline void PhasedLoop10MS(int offset) { PhasedLoopXMS(10, offset); }
 
 }  // namespace time
 }  // namespace aos
diff --git a/frc971/actions/drivetrain_actor.cc b/frc971/actions/drivetrain_actor.cc
index 71a1be8..a453502 100644
--- a/frc971/actions/drivetrain_actor.cc
+++ b/frc971/actions/drivetrain_actor.cc
@@ -45,9 +45,7 @@
                                     2.0);
 
   while (true) {
-    // wait until next 10ms tick
-    // TODO(sensors): update this time thing for some reason.
-    ::aos::time::PhasedLoop10MS(5000);
+    ::aos::time::PhasedLoopXMS(5, 2500);
 
     control_loops::drivetrain_queue.status.FetchLatest();
     if (control_loops::drivetrain_queue.status.get()) {
diff --git a/frc971/autonomous/auto.cc b/frc971/autonomous/auto.cc
index 5d9733a..a5cfd22 100644
--- a/frc971/autonomous/auto.cc
+++ b/frc971/autonomous/auto.cc
@@ -74,7 +74,7 @@
   const double side_offset = kRobotWidth * radians / 2.0;
 
   while (true) {
-    ::aos::time::PhasedLoop10MS(5000);  // wait until next 10ms tick
+    ::aos::time::PhasedLoopXMS(5, 2500);
     driveTrainState = profile.Update(side_offset, goal_velocity);
 
     if (::std::abs(driveTrainState(0, 0) - side_offset) < epsilon) break;
@@ -100,7 +100,7 @@
 void WaitUntilDoneOrCanceled(aos::common::actions::Action *action) {
   while (true) {
     // Poll the running bit and auto done bits.
-    ::aos::time::PhasedLoop10MS(5000);
+    ::aos::time::PhasedLoopXMS(5, 2500);
     if (!action->Running() || ShouldExitAuto()) {
       return;
     }
diff --git a/frc971/wpilib/wpilib_interface.cc b/frc971/wpilib/wpilib_interface.cc
index c60feec..0981564 100644
--- a/frc971/wpilib/wpilib_interface.cc
+++ b/frc971/wpilib/wpilib_interface.cc
@@ -222,7 +222,7 @@
 
     ::aos::SetCurrentThreadRealtimePriority(kPriority);
     while (run_) {
-      ::aos::time::PhasedLoopXMS(5, 9000);
+      ::aos::time::PhasedLoopXMS(5, 4000);
       RunIteration();
     }