Changeset 704

Show
Ignore:
Timestamp:
02/18/08 10:26:22 (9 months ago)
Author:
dormando
Message:

Swap time(2) with gettimeofday(2), since the latter is optimized away on some platforms. (Brian Aker) <brian@tangent.org>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/server/memcached.c

    r701 r704  
    25662566/* time-sensitive callers can call it by hand with this, outside the normal ever-1-second timer */ 
    25672567static void set_current_time(void) { 
    2568     current_time = (rel_time_t) (time(0) - stats.started); 
     2568    struct timeval timer; 
     2569 
     2570    gettimeofday(&timer, NULL); 
     2571    current_time = (rel_time_t) (timer.tv_sec - stats.started); 
    25692572} 
    25702573