Just wanted to let you know that I can reproduce that delay on a unit by calling SetLocalTime before a displaying a dialog. It seems to happen when I set the time very quickly over and over again in a short period of time. The first time I set the time, it happens at an acceptable speed, but by the 7th time it's taking over a second. It seems like if I don't set the time for a around 30 seconds, then try again, I don't have a performance issue.
A couple things you might try.
1) Saving the time setting and starting a timer for 30 seconds. Do not allow any updates to the local time for these 30 seconds. Once the timer has timed out, allow an update to the time setting. So the most you will ever update the time is once every 30 seconds.
2) Create a thread running in the background to set the time. Have a thread periodically check for a new time setting, and call SetLocalTime if needed. Maybe the thread could check for a new time update every 10 seconds.
From what I can tell setting the real-time clock on a terminal is not the lightest operation and you wouldn't want to be doing that often as that could affect performance.
|