<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>
&gt;&gt; &quot;clock_gettime()&quot; 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 &#8220;mgettimeofday&#8221;. &nbsp;&nbsp;It does a new function mgettimeofday as an #else (to cover non windows implementations). &nbsp;All the calls to gettimeofday are reimplemented as mgettimeofday. &nbsp;Perhaps the best procedure would be to have the following: (pseudo code)<BR>
<BR>
#ifdef WIN32 <BR>
Int mgettimeofday()<BR>
{<BR>
&nbsp;&nbsp;// 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. &nbsp;&nbsp;I see the 100% cpu whenever the time jumps back. &nbsp;The cpu max out continues until the time catches up. &nbsp;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>