Re: [go-nuts] ticker not firing often enough in minimal mac app with run loop

2019-09-04 Thread Gregory Pomerantz
On 9/4/19 2:30 PM, Gregory Pomerantz wrote: currenly just running the go program from the terminal, though I got similar results packaging it into an app. I soon get very long periods between ticker fires: Tick slow: 3.501350114s Tick slow: 5.551485377s I am seeing the same thing (Late 201

Re: [go-nuts] ticker not firing often enough in minimal mac app with run loop

2019-09-04 Thread Gregory Pomerantz
currenly just running the go program from the terminal, though I got similar results packaging it into an app. I soon get very long periods between ticker fires: Tick slow: 3.501350114s Tick slow: 5.551485377s I am seeing the same thing (Late 2012 13" MacBook Pro Retina). My first guess i

Re: [go-nuts] ticker not firing often enough in minimal mac app with run loop

2019-09-04 Thread Marcin Romaszewicz
I'm not quite sure how to avoid this, but I'm pretty sure that I know the cause. Read up on Grand Central Dispatch and Centralized Task Scheduling ( https://developer.apple.com/library/archive/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/DiscretionaryTasks.html). It's been a

[go-nuts] ticker not firing often enough in minimal mac app with run loop

2019-09-04 Thread Tor Langballe
I'm running a mac cocoa event loop, and calling a go ticker: void StartApp() { [NSAutoreleasePool new]; [NSApplication sharedApplication]; [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; [NSApp run]; } func test() { last := time.Now() ticker := time.NewTicker(t