5#include "flutter/fml/platform/win/message_loop_win.h"
7#include <VersionHelpers.h>
10#include "flutter/fml/logging.h"
17MessageLoopWin::MessageLoopWin()
18 : timer_(CreateWaitableTimer(NULL,
FALSE, NULL)) {
26 if (IsWindows10OrGreater()) {
31 timeBeginPeriod(timer_resolution_);
34MessageLoopWin::~MessageLoopWin() =
default;
36void MessageLoopWin::Run() {
40 FML_CHECK(WaitForSingleObject(timer_.
get(), INFINITE) == 0);
45void MessageLoopWin::Terminate() {
48 timeEndPeriod(timer_resolution_);
52 LARGE_INTEGER due_time = {0};
54 if (time_point > now) {
55 due_time.QuadPart = (time_point - now).ToNanoseconds() / -100;
void RunExpiredTasksNow()
#define FML_CHECK(condition)
constexpr uint32_t kLowResolutionTimer
constexpr uint32_t kHighResolutionTimer