From ed5673bf5ce442f6ae7e69e2bd3ca4ca7de1e8fd Mon Sep 17 00:00:00 2001 From: arvidn Date: Sat, 23 Apr 2016 09:42:32 -0400 Subject: [PATCH] attempt to make session_time() not return negative numbers --- include/libtorrent/aux_/session_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 65a82a6de..190321338 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -987,7 +987,7 @@ namespace libtorrent // +1 is here to make it possible to distinguish uninitialized (to // 0) timestamps and timestamps of things that happend during the // first second after the session was constructed - boost::int64_t const ret = total_seconds(aux::time_now() - m_created) + 1; + boost::int64_t const ret = total_seconds(clock_type::now() - m_created) + 1; TORRENT_ASSERT(ret >= 0); TORRENT_ASSERT(ret <= (std::numeric_limits::max)()); return static_cast(ret);