Ignore:
Timestamp:
Nov 26, 2009, 6:47:08 PM (12 years ago)
Author:
charles
Message:

(trunk libT) #2610 "avoid unnecessary calls to time(NULL)"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/verify.c

    r9328 r9593  
    5858    const int64_t buflen = tor->info.pieceSize;
    5959    uint8_t * buffer = tr_new( uint8_t, buflen );
    60     const time_t begin = time( NULL );
     60    const time_t begin = tr_time( );
    6161    time_t end;
    6262
     
    128128            }
    129129            tr_torrentSetPieceChecked( tor, pieceIndex, TRUE );
    130             now = time( NULL );
     130            now = tr_time( );
    131131            tor->anyDate = now;
    132132
     
    160160
    161161    /* stopwatch */
    162     end = time( NULL );
     162    end = tr_time( );
    163163    tr_tordbg( tor, "it took %d seconds to verify %"PRIu64" bytes (%"PRIu64" bytes per second)",
    164164               (int)(end-begin), tor->info.totalSize, (uint64_t)(tor->info.totalSize/(1+(end-begin))) );
Note: See TracChangeset for help on using the changeset viewer.