comparison base/Profiler.cpp @ 1216:c811991a5efa msvc2015_64

MSVC build fixes
author Chris Cannam
date Tue, 18 Oct 2016 14:03:55 +0100
parents 16dc7307d43a
children 48e9f538e6e9
comparison
equal deleted inserted replaced
1208:fef49844b3f8 1216:c811991a5efa
45 Profiles::~Profiles() 45 Profiles::~Profiles()
46 { 46 {
47 dump(); 47 dump();
48 } 48 }
49 49
50 #ifndef NO_TIMING
50 void Profiles::accumulate( 51 void Profiles::accumulate(
51 #ifndef NO_TIMING
52 const char* id, clock_t time, RealTime rt 52 const char* id, clock_t time, RealTime rt
53 #else
54 const char*, clock_t, RealTime
55 #endif
56 ) 53 )
57 { 54 {
58 #ifndef NO_TIMING
59 ProfilePair &pair(m_profiles[id]); 55 ProfilePair &pair(m_profiles[id]);
60 ++pair.first; 56 ++pair.first;
61 pair.second.first += time; 57 pair.second.first += time;
62 pair.second.second = pair.second.second + rt; 58 pair.second.second = pair.second.second + rt;
63 59
70 worstPair.first = time; 66 worstPair.first = time;
71 } 67 }
72 if (rt > worstPair.second) { 68 if (rt > worstPair.second) {
73 worstPair.second = rt; 69 worstPair.second = rt;
74 } 70 }
71 }
75 #endif 72 #endif
76 }
77 73
78 void Profiles::dump() const 74 void Profiles::dump() const
79 { 75 {
80 #ifndef NO_TIMING 76 #ifndef NO_TIMING
81 77