Migrate to AnyInvocable in platform code

PiperOrigin-RevId: 504104740
This commit is contained in:
Janusz Sobczak
2023-01-23 16:04:21 -08:00
committed by Copybara-Service
parent 7f34968b78
commit f4d85f9b90
100 changed files with 449 additions and 494 deletions
+2 -2
View File
@@ -15,7 +15,7 @@
#ifndef PLATFORM_API_TIMER_H_
#define PLATFORM_API_TIMER_H_
#include <functional>
#include "absl/functional/any_invocable.h"
namespace nearby {
namespace api {
@@ -35,7 +35,7 @@ class Timer {
//
// @return return true if success, otherwise false
virtual bool Create(int delay, int interval,
std::function<void()> callback) = 0;
absl::AnyInvocable<void()> callback) = 0;
// Stops timer. No timer signal is sent after the call.
virtual bool Stop() = 0;