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
  • 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 )