+bool TimeRecord::operator<(const TimeRecord &TR) const {
+ // Primary sort key is User+System time
+ if (UserTime+SystemTime < TR.UserTime+TR.SystemTime)
+ return true;
+ if (UserTime+SystemTime > TR.UserTime+TR.SystemTime)
+ return false;
+
+ // Secondary sort key is Wall Time
+ return Elapsed < TR.Elapsed;
+}
+
void TimeRecord::passStart(const TimeRecord &T) {
Elapsed -= T.Elapsed;
UserTime -= T.UserTime;
void TimeRecord::passStart(const TimeRecord &T) {
Elapsed -= T.Elapsed;
UserTime -= T.UserTime;
void passStart(const TimeRecord &T);
void passEnd(const TimeRecord &T);
void sum(const TimeRecord &TR);
void passStart(const TimeRecord &T);
void passEnd(const TimeRecord &T);
void sum(const TimeRecord &TR);
- bool operator<(const TimeRecord &TR) const {
- return UserTime+SystemTime < TR.UserTime+TR.SystemTime;
- }
+ bool operator<(const TimeRecord &TR) const;
void print(const char *PassName, const TimeRecord &TotalTime) const;
};
void print(const char *PassName, const TimeRecord &TotalTime) const;
};