Remove Timer::FireNow.

PiperOrigin-RevId: 811123106
This commit is contained in:
Francis Tsui
2025-09-24 18:44:41 -07:00
committed by Copybara-Service
parent eb3ae063f5
commit 72088b7fe2
15 changed files with 0 additions and 142 deletions
@@ -22,7 +22,6 @@
#include "absl/synchronization/mutex.h"
#include "absl/time/time.h"
#include "internal/platform/logging.h"
#include "internal/platform/runnable.h"
namespace nearby {
namespace windows {
@@ -63,27 +62,5 @@ bool Timer::Stop() {
return result;
}
bool Timer::FireNow() {
absl::MutexLock lock(&mutex_);
if (!callback_) {
LOG(ERROR) << "callback_ is empty";
return false;
}
if (task_executor_ == nullptr) {
task_executor_ = std::make_unique<SubmittableExecutor>();
}
if (task_executor_ == nullptr) {
LOG(ERROR) << "Failed to fire the task due to cannot create executor.";
return false;
}
task_executor_->Execute([&]() { callback_(); });
return true;
}
} // namespace windows
} // namespace nearby