summaryrefslogtreecommitdiff
path: root/platform/android/src/run_loop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/src/run_loop.cpp')
-rw-r--r--platform/android/src/run_loop.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/platform/android/src/run_loop.cpp b/platform/android/src/run_loop.cpp
index dff7d1d984..9ce9278b8c 100644
--- a/platform/android/src/run_loop.cpp
+++ b/platform/android/src/run_loop.cpp
@@ -1,9 +1,9 @@
#include "run_loop_impl.hpp"
#include <mbgl/util/platform.hpp>
-#include <mbgl/util/thread_local.hpp>
#include <mbgl/util/thread.hpp>
#include <mbgl/util/timer.hpp>
+#include <mbgl/util/scheduled_timer.hpp>
#include <mbgl/actor/scheduler.hpp>
#include <android/looper.h>
@@ -200,7 +200,7 @@ Milliseconds RunLoop::Impl::processRunnables() {
}
RunLoop* RunLoop::Get() {
- assert(static_cast<RunLoop*>(Scheduler::GetCurrent()));
+ assert(dynamic_cast<RunLoop*>(Scheduler::GetCurrent()));
return static_cast<RunLoop*>(Scheduler::GetCurrent());
}
@@ -258,5 +258,9 @@ void RunLoop::removeWatch(int) {
throw std::runtime_error("Not implemented.");
}
+std::unique_ptr<Scheduler::Scheduled> RunLoop::schedule(Duration timeout, std::weak_ptr<Mailbox> mailbox, std::unique_ptr<Message> message) {
+ return std::make_unique<ScheduledTimer>(*this, timeout, std::move(mailbox), std::move(message));
+}
+
} // namespace util
} // namespace mbgl