When running my app in the profiler, I see a significant amount of calls to Toybox.Background.registerForSleepEvent, and also significant time spent in these calls. See the screenshot below.
Anybody knows what is up with that?
I am not calling this function in my code. The documentation says it is to register for events when the sleep time configured on the device occurs. But the method has neither inputs nor returns.
developer.garmin.com/.../Background.html
Edit: the stack trace in the profiler only points to the functions, but what both functions have in common is a call to Method.invoke. So may be related to that, though I have no clue how.