2 // Object that keeps track of a time span.
3 // Span starts when the object is created, and
4 // ends when someone asks it for its XML representation.
5 // User can also call stop to cause timer to stop and
6 // call for XML representation later.
8 // Copyright 2005 by Keith Vertanen
10 #ifndef __TIME_SPAN_H__
11 #define __TIME_SPAN_H__
13 #include "FileLogger.h"
15 #include "SimpleTimer.h"
22 extern CFileLogger
* g_pLogger
;
26 typedef vector
<CTimeSpan
> VECTOR_TIME_SPAN
;
27 typedef vector
<CTimeSpan
*> VECTOR_TIME_SPAN_PTR
;
32 CTimeSpan(const string
& strName
, bool bAddDate
);
33 CTimeSpan(const string
& strName
, const string
& strXML
);
38 string
GetXML(const string
& strPrefix
= "", bool bSinglePointInTime
= false);
44 static string
GetTimeStamp();
45 static string
GetDateStamp();
49 string m_strStartTime
;
52 CSimpleTimer
* m_pTimer
;
53 string m_strStartDate
;
55 void InitMemberVars();