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/aos/logging/dynamic_logging_test.cc b/aos/logging/dynamic_logging_test.cc
index 2d051a8..9b78113 100644
--- a/aos/logging/dynamic_logging_test.cc
+++ b/aos/logging/dynamic_logging_test.cc
@@ -52,18 +52,18 @@
CHECK_EQ(message.Send(builder.Finish()), RawSender::Error::kOk);
--log_level;
if (log_level >= 0) {
- timer_handler->Setup(event_loop_send_->monotonic_now() +
- chrono::microseconds(100));
+ timer_handler->Schedule(event_loop_send_->monotonic_now() +
+ chrono::microseconds(100));
}
});
- timer_handler->Setup(event_loop_send_->monotonic_now() +
- chrono::microseconds(50));
+ timer_handler->Schedule(event_loop_send_->monotonic_now() +
+ chrono::microseconds(50));
// VLOG(1) at t=0us, t=100us, t=200us
aos::TimerHandler *vlog_timer_handler =
event_loop_main_->AddTimer([]() { VLOG(1) << "VLOG 1"; });
- vlog_timer_handler->Setup(event_loop_main_->monotonic_now(),
- chrono::microseconds(100));
+ vlog_timer_handler->Schedule(event_loop_main_->monotonic_now(),
+ chrono::microseconds(100));
DynamicLogging dynamic_logging(event_loop_main_.get());