now() calls a function.  now would be a direct variable.  At the beginning
of the current poll, you will find gstate.now = now().  From that point on,
gstate.now can be used as a stand in for the function as it really should
not change much before the end of the poll loop.

jm7


                                                                           
             "Richard                                                      
             Haselgrove"                                                   
             <r.haselgr...@bti                                          To 
             nternet.com>              <[email protected]>            
                                                                        cc 
             04/22/2009 09:22          <[email protected]>,     
             AM                        "BOINC Developers Mailing List"     
                                       <[email protected]>,       
                                       "David Anderson"                    
                                       <[email protected]>            
                                                                   Subject 
                                       Re: [boinc_alpha] 6.6.20 and work   
                                       scheduling]                         
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




> Almost everyplace should be using gstate.now.  This is set at the
> beginning
> of the current loop, and it avoids the expense of a system function call,
> and is within few milli seconds of being the same as now().  It also
gives
> all actions in the current loop the same timestamp.
>
> jm7

I'm not familiar with C++ syntax. Am I wrong to smell a rat between now and

now() ?





_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to