|
9 | 9 | #include "PlexTranscoderClient.h" |
10 | 10 |
|
11 | 11 | #include <boost/foreach.hpp> |
12 | | -#include <boost/timer.hpp> |
| 12 | +#include <boost/timer/timer.hpp> |
13 | 13 | #include <settings/AdvancedSettings.h> |
14 | 14 |
|
15 | 15 | using namespace std; |
@@ -233,7 +233,7 @@ bool CPlexServer::UpdateReachability() |
233 | 233 | if (m_connections.size() == 0) |
234 | 234 | return false; |
235 | 235 |
|
236 | | - m_connTestTimer.restart(); |
| 236 | + boost::timer::cpu_timer timer; // start timer |
237 | 237 | CLog::Log(LOGDEBUG, "CPlexServer::UpdateReachability Updating reachability for %s with %ld connections.", m_name.c_str(), m_connections.size()); |
238 | 238 |
|
239 | 239 | m_bestConnection.reset(); |
@@ -281,9 +281,10 @@ bool CPlexServer::UpdateReachability() |
281 | 281 | CSingleLock tlk(m_testingLock); |
282 | 282 | m_complete = true; |
283 | 283 | m_activeConnection = m_bestConnection; |
| 284 | + timer.stop(); |
284 | 285 |
|
285 | | - CLog::Log(LOGDEBUG, "CPlexServer::UpdateReachability Connectivity test to %s completed in %.1f Seconds -> %s", |
286 | | - m_name.c_str(), m_connTestTimer.elapsed(), m_activeConnection ? m_activeConnection->toString().c_str() : "FAILED"); |
| 286 | + CLog::Log(LOGDEBUG, "CPlexServer::UpdateReachability Connectivity test to %s completed in %s Seconds -> %s", |
| 287 | + m_name.c_str(), timer.format(1, "%w").c_str(), m_activeConnection ? m_activeConnection->toString().c_str() : "FAILED"); |
287 | 288 |
|
288 | 289 | return (bool)m_bestConnection; |
289 | 290 | } |
|
0 commit comments