Can the change of PC date affect to timers?

I am trying to change the PC date with the command: “date dd mm yy”.
I have an application running at the same time with many processes using timers.

When I try to change the date while this application is running, the application hangs when the timers are using.

This behaviour only happens when the date command is launched in the same terminal where the application has been launched before.

Any idea of what is happening?
Can the change of date and time in the PC affect to the use of timers in an application?
How to change the PC date and time correctly in this case?

I am using QNX 6.2.1 SE.

Thanks in advance.

Rmaza,

We noticed the same thing happening using QNX 6.3.

However, after some investigation I found it’s not the OS’s fault but rather how the code in our app was written.

For example in a thread we would set a timer to expire in 30 seconds at which point it would wake and move a piece of hardware. When the thread wakes up it would then check the current time vs the expected time it went to sleep to determine if it was running slow (due to other higher priority threads running) to make sure there wouldn’t be a hardware conflict of robots colliding. What happened was that if the OS time was changed when the app checked for a ‘slow’ time due to being delayed it would find the current time vs the expected time (expected time = time before timer started plus delay length of the timer) to be out of wack and we would hang.

So make sure that when the processes are waking up after the timer fires that they are not doing some time checks on the current time vs a time stored BEFORE the timer started or else you might encounter a similar problem.

Tim