diff options
-rw-r--r-- | trackerlogic.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/trackerlogic.c b/trackerlogic.c index 00aec1f..3560834 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
@@ -556,6 +556,7 @@ void clean_all_torrents( void ) { | |||
556 | size_t j; | 556 | size_t j; |
557 | time_t time_now = NOW; | 557 | time_t time_now = NOW; |
558 | size_t peers_count; | 558 | size_t peers_count; |
559 | ot_dword diff; struct timeval tv1, tv2; gettimeofday( &tv1, NULL ); | ||
559 | 560 | ||
560 | if( time_now <= last_clean_time ) | 561 | if( time_now <= last_clean_time ) |
561 | return; | 562 | return; |
@@ -624,6 +625,9 @@ void clean_all_torrents( void ) { | |||
624 | } | 625 | } |
625 | } | 626 | } |
626 | } | 627 | } |
628 | |||
629 | gettimeofday( &tv2, NULL ); diff = ( tv2.tv_sec - tv1.tv_sec ) * 1000000 + tv2.tv_usec - tv1.tv_usec; | ||
630 | fprintf( stderr, "Cleanup time taken: %u\n", diff ); | ||
627 | } | 631 | } |
628 | 632 | ||
629 | typedef struct { size_t val; ot_torrent * torrent; } ot_record; | 633 | typedef struct { size_t val; ot_torrent * torrent; } ot_record; |