mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Migrate to AnyInvocable in platform code
PiperOrigin-RevId: 504104740
This commit is contained in:
committed by
Copybara-Service
parent
7f34968b78
commit
f4d85f9b90
@@ -17,8 +17,6 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include "internal/platform/implementation/timer.h"
|
||||
|
||||
namespace nearby {
|
||||
@@ -29,7 +27,8 @@ class Timer : public api::Timer {
|
||||
Timer() = default;
|
||||
~Timer() override;
|
||||
|
||||
bool Create(int delay, int interval, std::function<void()> callback) override;
|
||||
bool Create(int delay, int interval,
|
||||
absl::AnyInvocable<void()> callback) override;
|
||||
bool Stop() override;
|
||||
bool FireNow() override;
|
||||
|
||||
@@ -38,7 +37,7 @@ class Timer : public api::Timer {
|
||||
|
||||
int delay_;
|
||||
int interval_;
|
||||
std::function<void()> callback_;
|
||||
absl::AnyInvocable<void()> callback_;
|
||||
HANDLE handle_ = NULL;
|
||||
HANDLE timer_queue_handle_ = NULL;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user