Posts

Post marked as solved
5 Replies
874 Views
I am writing a data acquisition and control application which needs to continuously sample data from devices, perfom calculations, and output results to devices (the hardware is either serial or ethernet). This app will run typically for days at a time, 24 hours a day, with very little user interaction. I am using timer callbacks, which works fine as long as there is user activity and the screen is not in sleep or screen saver. However, when there is no user activity and the screen sleeps, I find my callbacks are not occuring with good frequency. Now, I'm not doing any high speed sampling here- I'm in the range of 10's of samples / second, not hundreds or thousands, but I would like it to be consistent. I am finding when the display sleeps, there may be several seconds gap in samples.I have tried putting: myActivityRef = [[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityLatencyCritical reason:@"DAQC Processing"];but am still seeing sample frequency drop off when there is no user activity.Testing on OS X 10.14.6, sleep set to never, display sleep set to 1 hour, screen saver set to 30 minutes.
Posted
by lmcorp.
Last updated
.