forked from premiere/premiere-libtorrent
timer initialization fix
This commit is contained in:
parent
c9a1bd219e
commit
25798ba1fa
|
@ -110,9 +110,16 @@ namespace libtorrent
|
|||
struct tracker_logger;
|
||||
#endif
|
||||
|
||||
// used to initialize the g_current_time before
|
||||
// anything else
|
||||
struct initialize_timer
|
||||
{
|
||||
initialize_timer();
|
||||
};
|
||||
|
||||
// this is the link between the main thread and the
|
||||
// thread started to run the main downloader loop
|
||||
struct session_impl: boost::noncopyable
|
||||
struct session_impl: boost::noncopyable, initialize_timer
|
||||
{
|
||||
|
||||
// the size of each allocation that is chained in the send buffer
|
||||
|
|
|
@ -1592,6 +1592,11 @@ namespace aux {
|
|||
// is not necessary
|
||||
extern ptime g_current_time;
|
||||
|
||||
initialize_timer::initialize_timer()
|
||||
{
|
||||
g_current_time = time_now_hires();
|
||||
}
|
||||
|
||||
void session_impl::on_tick(error_code const& e)
|
||||
{
|
||||
mutex::scoped_lock l(m_mutex);
|
||||
|
|
Loading…
Reference in New Issue