X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae999b11ec671b5a12a30f24c0aa6b36978b3fd6..189da67c55cb8ce76725d77e58b76c1fc666d9a6:/src/cocoa/timer.mm?ds=sidebyside diff --git a/src/cocoa/timer.mm b/src/cocoa/timer.mm index 2dfe2cb30a..4815472d7b 100644 --- a/src/cocoa/timer.mm +++ b/src/cocoa/timer.mm @@ -22,8 +22,9 @@ #if wxUSE_TIMER +#include "wx/timer.h" + #ifndef WX_PRECOMP - #include "wx/timer.h" #endif #include "wx/cocoa/autorelease.h" @@ -76,7 +77,7 @@ IMPLEMENT_CLASS(wxTimer, wxTimerBase) { m_timer->Notify(); //wxTimerBase method } -@end +@end // ---------------------------------------------------------------------------- // wxTimer @@ -95,18 +96,18 @@ void wxTimer::Init() bool wxTimer::Start(int millisecs, bool oneShot) { Stop(); - + wxAutoNSAutoreleasePool thePool; wxNSTimerData *timerData = [[wxNSTimerData alloc] initWithWxTimer:this]; - m_cocoaNSTimer = [[NSTimer + m_cocoaNSTimer = [[NSTimer scheduledTimerWithTimeInterval: millisecs / 1000.0 //seconds - target: timerData - selector: @selector(onNotify:) - userInfo: nil - repeats: oneShot == false] retain]; + target: timerData + selector: @selector(onNotify:) + userInfo: nil + repeats: oneShot == false] retain]; [timerData release]; - + return IsRunning(); }