Fixing timer callbacks.

This commit is contained in:
Ben Vanik 2015-08-29 23:42:40 -07:00
parent 7172f7575e
commit 7f505a15b7
1 changed files with 4 additions and 4 deletions

View File

@ -294,7 +294,7 @@ class Win32Timer : public Win32Handle<Timer> {
LARGE_INTEGER due_time_li;
due_time_li.QuadPart = due_time.count() / 100;
auto completion_routine =
opt_callback ? reinterpret_cast<PTIMERAPCROUTINE>(CompletionRoutine)
callback_ ? reinterpret_cast<PTIMERAPCROUTINE>(CompletionRoutine)
: NULL;
return SetWaitableTimer(handle_, &due_time_li, 0, completion_routine, this,
FALSE)
@ -309,7 +309,7 @@ class Win32Timer : public Win32Handle<Timer> {
LARGE_INTEGER due_time_li;
due_time_li.QuadPart = due_time.count() / 100;
auto completion_routine =
opt_callback ? reinterpret_cast<PTIMERAPCROUTINE>(CompletionRoutine)
callback_ ? reinterpret_cast<PTIMERAPCROUTINE>(CompletionRoutine)
: NULL;
return SetWaitableTimer(handle_, &due_time_li, int32_t(period.count()),
completion_routine, this, FALSE)