[zfs-discuss] X11 XtAppAddTimeOut is not working properly.

2010-11-21 Thread Debabrata Debroy
Hi All
  I have written Following program so that fun() gets called by every 10 mili 
seconds.But after executing the program I Found its calling the function after 
20 mili seconds.If I specify timeinterval as 20 mili second in XtAppAddTimeOut 
function its calling fun method after 30 mili seconds.
Here is my Code :

XtIntervalId main_timer;
static XtAppContext app_context;
unsigned long interval=10;
void setup();
void fun()
{
 time_t curtime;
 char buffer[30];
 struct timeval tv;
 gettimeofday(tv, NULL);
 curtime=tv.tv_sec;

 strftime(buffer,30,%m-%d-%Y  %T.,localtime(curtime));
//printf(%s%ld\n,buffer,tv.tv_usec/1000);
coutbuffer-tv.tv_usec/1000##EXIT##Received SIGTERM 
signalendl;
//LOG_AXIS_INFO(##EXIT##Received SIGTERM signal);
setup();
}

void TimeOutCB(XtPointer  cl_data, XtIntervalId *timer)
{
   fun();
}

void setup()
{
//setup();
XtAppAddTimeOut(app_context, interval, TimeOutCB, NULL);
}

int main(int argc, char *argv[])
{
 argc = 2;
 char* argv1[]  = {One, Two};

XtVaAppInitialize (app_context, ConfigFileReaderTest, NULL, 0, 
argc, argv1, NULL, NULL);
setup();
//  signal( SIGTERM, handleSigTerm );
while(1)
{
XtAppProcessEvent(app_context, XtIMAll);
 }
return 0;
}

X11 library I am using is ./libX11.so.5.
Enterprise Solaris Version is Solaris 10 update 9  

Can you please suggest whether there is any fix for it .As same code I have 
seen is working with Linux .
-- 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


[zfs-discuss] X11 XtAppAddTimeOut is not working properly.

2010-11-21 Thread Debabrata Debroy
Hi All
I have written Following program so that fun() gets called by every 10 mili 
seconds.But after executing the program I Found its calling the function after 
20 mili seconds.If I specify timeinterval as 20 mili second in XtAppAddTimeOut 
function its calling fun method after 30 mili seconds.
I am attaching my code .

Solaris Version I am using it Solaris 10 updated  9
X11c library version is libX11.so.5

Please let me know if there is any fix available for it .
-- 
This message posted from opensolaris.org

test.cpp
Description: Binary data
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss