From 9b96ced90a7f54c68ef3b90c578e2456726a0c1d Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sun, 10 Apr 2011 03:57:37 +0000 Subject: [PATCH] (trunk libT) #4175 "very bizarre and unwieldy logfile in 2.30b2" -- another test commit for gunzip :) --- libtransmission/announcer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtransmission/announcer.c b/libtransmission/announcer.c index 0995310f0..c45dab3c4 100644 --- a/libtransmission/announcer.c +++ b/libtransmission/announcer.c @@ -297,12 +297,15 @@ tr_tier; static time_t get_next_scrape_time( int interval ) { + time_t ret; const time_t now = tr_time( ); /* Add the interval, and then increment to the nearest 10th second. * The latter step is to increase the odds of several torrents coming * due at the same time to improve multiscrape. */ - return (now+interval) + (10-((now+interval)%10)); + ret = now + interval; + while( ret % 10 ) ++ret; + return ret; } static void -- 2.40.0