certi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: RE: RE: Re: [certi-dev] CERTI performance issue


From: Gotthard, Petr
Subject: RE: RE: RE: Re: [certi-dev] CERTI performance issue
Date: Tue, 16 Jun 2009 12:58:15 +0200

> After you tried the Petr solution I would advise you to
> add an usleep(5 * 1000)  BEFORE ticking the first time
> (may be put before the while loop) this may leads you
> to grantArrived with no further sleep most of the time, thus
> you'll drop the number of tick too.

I think the most optimal solution is without any sleep. You could save a
millisecond by using usleep(4*1000) instead. ;-)

Why don't you do just:

    nextEventRequest( ... ) 

    while( true ) 
    { 
        tick(1.0, 0.0); 

        if( grantArrived ) 
                 break; 
    }

Such tick would wait only until the grant arrives. Not a single
millisecond more.


Petr





reply via email to

[Prev in Thread] Current Thread [Next in Thread]