dustinrue/ControlPlane — pull request #254 by VladimirTechMan (2013-04-30 10:00:46+00:00)
Title: Small improvements to CPController

Finishing on the series of clean-up changes and refactoring to **CPController** that I planned these days, here are a few more. :)

*To note specifically on the change in method* **doUpdate**: We always create and run a non-repeating timer in the code now, to call that method. According to the Apple's developer documentation (and quickly confirmed by setting a breakpoint and making several checks), the **timeInterval** method of a non-repeating timer will always return 0 (for details see https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/Reference/NSTimer.html#//apple_ref/occ/instm/NSTimer/timeInterval). Thus it is enough to just check the user's default value for interval itself, in the existing if-condition.