Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Mon Nov 20, 2017 2:23 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: SetLocalTime
PostPosted: Fri Jan 25, 2008 12:12 pm 
Offline

Joined: Wed Jan 16, 2008 7:09 am
Posts: 8
If I follow a call to ::SetLocalTime() with a screen refresh, or ShowWindow(SW_SHOW), the screen redraws very slowly. If I comment out the call to SetLocalTime, the drawing is normal. Is the OS being bogged down by the SetLocalTime Call?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 28, 2008 2:38 pm 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
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.

_________________
Ron L.

http://www.beijerelectronicsinc.com/


Top
 Profile  
 
 Post subject: Re: SetLocalTime
PostPosted: Mon Jun 09, 2008 1:46 pm 
Offline

Joined: Wed Jan 16, 2008 7:09 am
Posts: 8
When I set the date/time using the control panel function. The same thing happens. (this is without my application running). Once I hit apply on the Date/Time Properties dialog, it hangs up. Ok, X, Apply become non functional. Other windows are functional but the graphics refresh becomes very sluggish. I have to power off and on again before I can do anything else. I will try this on another unit to see if it does the same thing, but I'm fairly certain this is why my app is freezing up when setting the local time.

Tom Roberts.


Top
 Profile  
 
 Post subject: Re: SetLocalTime
PostPosted: Mon Jun 09, 2008 2:17 pm 
Offline

Joined: Wed Jan 16, 2008 7:09 am
Posts: 8
My other unit does not exhibit this behavior. In the field we have 13 of 27 units that are having the same issue.


Top
 Profile  
 
 Post subject: Re: SetLocalTime
PostPosted: Tue Jun 10, 2008 7:47 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Wed Mar 08, 2006 12:35 pm
Posts: 31
Location: Salt Lake City, Utah
Tom,
Can you check the Windows CE OS image version on both of these units?
Run \HardDisk\bin\WinVerCE.exe

The difference in behavior may be due to different software. In that case we can help you upgrade your units.

_________________
Brian Crofts

QSI Corporation

801-466-8770 x431

http://www.qsicorp.com


Top
 Profile  
 
 Post subject: Re: SetLocalTime
PostPosted: Tue Jun 10, 2008 11:39 am 
Offline

Joined: Wed Jan 16, 2008 7:09 am
Posts: 8
I installed the newest image, but it did not affect the issue. The bottom line is, anytime SetLocalTime is called, the os is unresponsive for 6 or more seconds, sometimes a lot longer, depending on what else is going on.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group