The code as I write this, creates the internalTimer with scheduledTimer(). on macOS, that means the timer won't run when the mouse is down in a menu item or other tracking loop. Instead, create the timer unscheduled, and schedule it on the runloop with the correct mode. See NSRunLoop's add(timer: mode:)
At least there should be a comment warning programmers of the problem.
The code as I write this, creates the internalTimer with scheduledTimer(). on macOS, that means the timer won't run when the mouse is down in a menu item or other tracking loop. Instead, create the timer unscheduled, and schedule it on the runloop with the correct mode. See NSRunLoop's add(timer: mode:)
At least there should be a comment warning programmers of the problem.