X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae999b11ec671b5a12a30f24c0aa6b36978b3fd6..cbc82a22cc4cb21fe3ca705ed5da5644cef90e3a:/src/cocoa/timer.mm 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(); }