Change Informix Time
Posted in 2004
Topics: General Discussion
Hi, We use USEOSTIME parameter to decide how Informix will use the time either from Operating Systems (OS) or will handle itself. If I use time maintained by Informix, how can I change if required some time ? With Regards, Indranil Deb
--0__=09BBE47CDFDC86528f9e8a93df938690918c09BBE47CDFDC8652 Content-type: multipart/alternative; Boundary="1__=09BBE47CDFDC86528f9e8a93df938690918c09BBE47CDFDC8652" --1__=09BBE47CDFDC86528f9e8a93df938690918c09BBE47CDFDC8652 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: quoted-printable There is a bit of a misnomer in the ter USEOSTIME. The engine always u= ses the time obtained from the OS. We have an 'alarm handler' that fires once a second to do just a bit of= house cleaning. Part of the stuff that it does is to call the 'c' rout= ine time(NULL) to obtain the current time in seconds. If USEOSTIME is set = to 0 then we use that value to determine the value of the SQL CURRENT. If USEOSTIME is set to 1, then we get the time directly from the OS by usi= ng the gettimeofday() or ftime() call at the time that we have to obtain t= he time. So in both cases, we are obtaining the time from the OS. It's just tha= t one has a second granularity while the other has a microsecond granular= ity. In the past, the cost of a call to = "INDRANIL DEB" = <debindranil@indi = atimes.com> = To Sent by: ids@iiug.org = forum.subscriber@ = cc iiug.org = Subj= ect Change Informix Time [3356] = 08/13/2004 07:35 = AM = = = = = Hi, We use USEOSTIME parameter to decide how Informix will use the time either from Operating Systems (OS) or will handle itself. If I use time maintained by Informix, how can I change if required so= me time ? With Regards, Indranil Deb = --1__=09BBE47CDFDC86528f9e8a93df938690918c09BBE47CDFDC8652 Content-type: text/html; charset=US-ASCII Content-Disposition: inline Content-transfer-encoding: quoted-printable <html><body> <p>There is a bit of a misnomer in the ter USEOSTIME. The engine alway= s uses the time obtained from the OS.<br> <br> We have an 'alarm handler' that fires once a second to do just a bit of= house cleaning. Part of the stuff that it does is to call the 'c' rou= tine time(NULL) to obtain the current time in seconds. If USEOSTIME is= set to 0 then we use that value to determine the value of the SQL CURR= ENT. If USEOSTIME is set to 1, then we get the time directly from the = OS by using the gettimeofday() or ftime() call at the time that we have= to obtain the time.<br> <br> <br> So in both cases, we are obtaining the time from the OS. It's just tha= t one has a second granularity while the other has a microsecond granul= arity.<br> <br> <br> In the past, the cost of a call to<br> <img src=3D"cid:10__=3D09BBE47CDFDC86528f9e8a93df938@us.ibm.com" width=3D= "16" height=3D"16" alt=3D"Inactive hide details for "INDRANIL DEB&= quot; <debindranil@indiatimes.com>">"INDRANIL DEB" <= debindranil@indiatimes.com><br> <br> <br> <table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">= <tr valign=3D"top"><td style=3D"background-image:url(cid:20__=3D09BBE47= CDFDC86528f9e8a93df938@us.ibm.com); background-repeat: no-repeat; " wid= th=3D"40%"> <ul> <ul> <ul> <ul><b><font size=3D"2">"INDRANIL DEB" <debindranil@indiat= imes.com></font></b><font size=3D"2"> </font><br> <font size=3D"2">Sent by: forum.subscriber@iiug.org</font> <p><font size=3D"2">08/13/2004 07:35 AM</font></ul> </ul> </ul> </ul> </td><td width=3D"60%"> <table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">= <tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3= 0__=3D09BBE47CDFDC86528f9e8a93df938@us.ibm.com" border=3D"0" height=3D"= 1" width=3D"58" alt=3D""><br> <div align=3D"right"><font size=3D"2">To</font></div></td><td width=3D"= 100%"><img src=3D"cid:30__=3D09BBE47CDFDC86528f9e8a93df938@us.ibm.com" = border=3D"0" height=3D"1" width=3D"1" alt=3D""><br> <font size=3D"2">ids@iiug.org</font></td></tr> <tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3= 0__=3D09BBE47CDFDC86528f9e8a93df938@us.ibm.com" border=3D"0" height=3D"= 1" width=3D"58" alt=3D""><br> <div align=3D"right"><font size=3D"2">cc</font></div></td><td width=3D"= 100%"><img src=3D"cid:30__=3D09BBE47CDFDC86528f9e8a93df938@us.ibm.com" = border=3D"0" height=3D"1" width=3D"1" alt=3D""><br> </td></tr> <tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3= 0__=3D09BBE47CDFDC86528f9e8a93df938@us.ibm.com" border=3D"0" height=3D"= 1" width=3D"58" alt=3D""><br> <div align=3D"right"><font size=3D"2">Subject</font></div></td><td widt= h=3D"100%"><img src=3D"cid:30__=3D09BBE47CDFDC86528f9e8a93df938@us.ibm.= com" border=3D"0" height=3D"1" width=3D"1" alt=3D""><br> <font size=3D"2">Change Informix Time [3356]</font></td></tr> </table> <table border=3D"0" cellspacing=3D"0" cellpadding=3D"0"> <tr valign=3D"top"><td width=3D"58"><img src=3D"cid:30__=3D09BBE47CDFDC= 86528f9e8a93df938@us.ibm.com" border=3D"0" height=3D"1" width=3D"1" alt= =3D""></td><td width=3D"336"><img src=3D"cid:30__=3D09BBE47CDFDC86528f9= e8a93df938@us.ibm.com" border=3D"0" height=3D"1" width=3D"1" alt=3D""><= /td></tr> </table> </td></tr> </table> <br> <tt>Hi,<br> We use USEOSTIME parameter to decide how Informix will use the t= ime either from Operating Systems (OS) or will handle itself.<br> <br> If I use time maintained by Informix, how can I change if requir= ed some time ?<br> <br> With Regards,<br> <br> Indranil Deb<br> <br> </tt><br> </body></html>= --1__=09BBE47CDFDC86528f9e8a93df938690918c09BBE47CDFDC8652-- --0__=09BBE47CDFDC86528f9e8a93df938690918c09BBE47CDFDC8652 Content-type: image/gif; name="graycol.gif" Content-Disposition: inline; filename="graycol.gif" Content-ID: <10__=09BBE47CDFDC86528f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7 --0__=09BBE47CDFDC86528f9e8a93df938690918c09BBE47CDFDC8652 Content-type: image/gif; name="pic01703.gif" Content-Disposition: inline; filename="pic01703.gif" Content-ID: <20__=09BBE47CDFDC86528f9e8a93df938@us.ibm.com> Content-transfer-encodi