RE: [reSIProcate] Suggestion to replace GetSystemTime() with GetT ickCount() on Windows
Thanks for pointing this out Kaiduan.
Note: GetTickCount returns a 32bit unsigned int representing the number of
MS since the system was started.
I believe this solution will work - even when the count wraps after 49.7
days. But there are some problems:
1. the method names getSystemTime is no longer accurate
2. the method getTimeMicroSec - will no longer have microsecond resolution
I would like to get this issue solved - so maybe a change in the method
names and some new methods are required. Does anyone know if UNIX or other
OSs support a similar call? ie. one that is not dependant on the System
clock?
Note: This problem is also a concern for systems running NTP clients as NTP
clients can adjust the system clock and skew resip timers.
-----Original Message-----
From: kaiduan xie [mailto:kaiduanx@xxxxxxxx]
Sent: Thursday, November 25, 2004 6:01 PM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: [reSIProcate] Suggestion to replace GetSystemTime() with
GetTickCount() on Windows
Hi, all,
Today while running my DUM based SIP client, a friend
changed my system time to backward, i.e., change from
Nov 25 to Nov 24. And the SIP client didnot re-fresh
the registration anymore. After reviewing the Timer
class, and I found it is using GetSystemTime() and
this is the reason. The re-registration timer will
expire one day later! It is better to use the system
startup time instead of the wall-clock time, so please
change GetSystemTime to GetTickCount() for Windows. I
tested with the GetTickCount and found that there is
no problem.
Any comments are welcome.
kaiduan
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel