<HTML>
<HEAD>
<TITLE>Re: [Live-devel] Patch : clock changing issue</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
>> "clock_gettime()" does not seem to be portable. (In particular, Mac OS X doesn't seem to have it, and (I suspect) Windows doesn't either.)<BR>
<BR>
The patch does not change the windows implementation other than renaming the function “mgettimeofday”. It does a new function mgettimeofday as an #else (to cover non windows implementations). All the calls to gettimeofday are reimplemented as mgettimeofday. Perhaps the best procedure would be to have the following: (pseudo code)<BR>
<BR>
#ifdef WIN32 <BR>
Int mgettimeofday()<BR>
{<BR>
// Normal windows implementation<BR>
}<BR>
#else <BR>
Int mgettimeofday(){<BR>
<BR>
#ifdef MONOTONIC_CLOCK<BR>
// Call clock_gettime() variant<BR>
#else<BR>
// call regular gettimeofday()<BR>
gettimeofday()<BR>
#endif<BR>
#endif<BR>
<BR>
This could be handled with a compile flag that is defined in the config.linux and config.linux-gdb configurations. I see the 100% cpu whenever the time jumps back. The cpu max out continues until the time catches up. This definitely seems to fix it.<BR>
<BR>
Regards,<BR>
Stuart</SPAN></FONT>
<BR>
- ------------------------------------------------------------------------------<BR>
Confidentiality Notice: The information contained in this transmission is legally privileged and confidential, intended only for the use of the individual(s) or entities named above. This email and any files transmitted with it are the property of Pelco. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you receive this communication in error, please notify us immediately by telephone call to +1-559-292-1981 or forward the e-mail to administrator@pelco.com and then permanently delete the e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. <BR>
- ------------------------------------------------------------------------------<BR>
</BODY>
</HTML>