Rename timer `Setup` function to `Schedule`
This patch was motivated by my desire to fix a typo in the function
name. The noun "setup" is 1 word. The verb "set up" is 2 words. All
other member functions are verbs, so this one should be a verb too.
That means that the function should be called `SetUp`. During the
discussion that resulted from the rename, James Kuszmaul pointed out
that "setting up" a timer can be confusing. It implies that you can
only "set up" a timer once. But the intent is to let users set up
timers as many times as they like. So we decided on renaming the
function to `Schedule`. That conveys the purpose and intent better.
I took this opportunity to fix some other typos involving the verb
"set up".
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I2f557d1f946960af82711f248820d5e2d385a5d3
diff --git a/y2022/localizer/localizer_test.cc b/y2022/localizer/localizer_test.cc
index 6083143..0db26b6 100644
--- a/y2022/localizer/localizer_test.cc
+++ b/y2022/localizer/localizer_test.cc
@@ -420,8 +420,8 @@
}
});
roborio_test_event_loop_->OnRun([timer, this]() {
- timer->Setup(roborio_test_event_loop_->monotonic_now(),
- std::chrono::milliseconds(5));
+ timer->Schedule(roborio_test_event_loop_->monotonic_now(),
+ std::chrono::milliseconds(5));
});
}
{
@@ -474,8 +474,8 @@
builder.Send(TargetEstimate::Pack(*builder.fbb(), estimate.get())));
});
camera_test_event_loop_->OnRun([timer, this]() {
- timer->Setup(camera_test_event_loop_->monotonic_now(),
- std::chrono::milliseconds(50));
+ timer->Schedule(camera_test_event_loop_->monotonic_now(),
+ std::chrono::milliseconds(50));
});
}
@@ -508,7 +508,7 @@
localizer_control_x_ = x;
localizer_control_y_ = y;
localizer_control_theta_ = theta;
- localizer_control_send_timer_->Setup(
+ localizer_control_send_timer_->Schedule(
roborio_test_event_loop_->monotonic_now());
}
::testing::AssertionResult IsNear(double expected, double actual,