Changeset ac15b24be029a27ca7bdec62dc740c72c2ddaee0

Show
Ignore:
Timestamp:
19/08/08 22:24:52 (4 months ago)
Author:
Rémi Duraffort <ivoire@videolan.org>
git-committer:
Rémi Duraffort <ivoire@videolan.org> 1219177492 +0200
git-parent:

[98ea2ba6901b56eea1e518ded8ad5779b6d040d4]

git-author:
Rémi Duraffort <ivoire@videolan.org> 1219177131 +0200
Message:

Don't call mdate too many times.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/misc/logger.c

    r6dd5c5c rac15b24  
    436436static void DoRRD( intf_thread_t *p_intf ) 
    437437{ 
    438     if( mdate() - p_intf->p_sys->last_update < 1000000 ) 
     438    mtime_t now = mdate(); 
     439    if( now - p_intf->p_sys->last_update < 1000000 ) 
    439440        return; 
    440     p_intf->p_sys->last_update = mdate()
     441    p_intf->p_sys->last_update = now
    441442 
    442443    if( p_intf->p_libvlc->p_stats ) 
  • modules/services_discovery/sap.c

    rd11fd0d rac15b24  
    821821 
    822822                /* Compute the average period */ 
    823                 p_announce->i_period = (p_announce->i_period + (mdate() - p_announce->i_last)) / 2; 
    824                 p_announce->i_last = mdate(); 
     823                mtime_t now = mdate(); 
     824                p_announce->i_period = (p_announce->i_period + (now - p_announce->i_last)) / 2; 
     825                p_announce->i_last = now; 
    825826            } 
    826827            FreeSDP( p_sdp ); p_sdp = NULL; 
  • modules/visualization/galaktos/plugin.c

    r0f7394a rac15b24  
    249249        p_thread->psz_title = NULL; 
    250250 
     251        mtime_t now = mdate(); 
    251252        if (++count%100==0) 
    252253        { 
    253             realfps=100/((mdate()/1000-fpsstart)/1000); 
     254            realfps=100/((now/1000-fpsstart)/1000); 
    254255 //           printf("%f\n",realfps); 
    255             fpsstart=mdate()/1000; 
     256            fpsstart=now/1000; 
    256257        } 
    257258        //framerate limiter 
    258         timed=mspf-(mdate()/1000-timestart); 
     259        timed=mspf-(now/1000-timestart); 
    259260      //   printf("%d,%d\n",time,mspf); 
    260261        if (timed>0) msleep(1000*timed); 
  • src/misc/stats.c

    rd666030 rac15b24  
    514514    { 
    515515        counter_sample_t *p_new, *p_old; 
    516         if( mdate() - p_counter->last_update < p_counter->update_interval ) 
     516        mtime_t now = mdate(); 
     517        if( now - p_counter->last_update < p_counter->update_interval ) 
    517518        { 
    518519            return VLC_EGENERIC; 
    519520        } 
    520         p_counter->last_update = mdate()
     521        p_counter->last_update = now
    521522        if( p_counter->i_type != VLC_VAR_FLOAT && 
    522523            p_counter->i_type != VLC_VAR_INTEGER )