From b7fb1f3d3cb1f0938a2f36cb75ba5786c8e300f4 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Tue, 5 Nov 2013 23:25:47 -0200 Subject: [PATCH] strange android/boost compilation fix --- libtorrent/src/kademlia/node.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libtorrent/src/kademlia/node.cpp b/libtorrent/src/kademlia/node.cpp index 26c07ae9..0da27d71 100644 --- a/libtorrent/src/kademlia/node.cpp +++ b/libtorrent/src/kademlia/node.cpp @@ -556,13 +556,18 @@ bool node_impl::refresh_storage() { m_last_refreshed_item = m_storage_table.begin()->first; } + time_duration sleepToRefresh; if( num_refreshable ) { - m_next_storage_refresh = minutes(60) / num_refreshable + time_now(); + sleepToRefresh = minutes(60) / num_refreshable; } else { - m_next_storage_refresh = minutes(10) + time_now(); + sleepToRefresh = minutes(10); } + m_next_storage_refresh = time_now() + sleepToRefresh; - printf("node dht: next storage refresh in %d seconds\n", (m_next_storage_refresh - time_now())/1000000 ); +#ifndef __ANDROID__ + printf("node dht: next storage refresh in %d seconds\n", + static_cast(sleepToRefresh/1000000) ); +#endif return did_something; }