40 #include <sys/types.h>
41 #include <sys/timeb.h>
45 #include <sys/types.h>
46 #include <sys/times.h>
56 # define SELECT_MASK fd_set
62 # define SELECT_MASK void
64 # define SELECT_MASK int
69 #define VTK_LOG_EVENT_LENGTH 40
100 static void SetMaxEntries(
int a);
101 static int GetMaxEntries();
108 static void FormatAndMarkEvent(
const char *EventString, ...);
114 static void DumpLog(
const char *filename);
120 static void MarkStartEvent(
const char *EventString);
121 static void MarkEndEvent(
const char *EventString);
123 static void DumpLogWithIndents(ostream *os,
double threshold);
129 static int GetNumberOfEvents();
130 static int GetEventIndent(
int i);
131 static double GetEventWallTime(
int i);
132 static const char* GetEventString(
int i);
136 static void MarkEvent(
const char *EventString);
140 static void ResetLog();
143 static void AllocateLog();
146 static void CleanupLog();
150 static double GetUniversalTime();
154 static double GetCPUTime();
164 double GetElapsedTime();
182 static timeb FirstWallTime;
183 static timeb CurrentWallTime;
185 static FILETIME FirstWallTime;
186 static FILETIME CurrentWallTime;
201 static void DumpEntry(ostream& os,
int index,
double time,
double deltatime,
202 int tick,
int deltatick,
const char *event);
214 #define vtkTimerLogMacro(string) \
216 vtkTimerLog::FormatAndMarkEvent("Mark: In %s, line %d, class %s: %s", \
217 __FILE__, __LINE__, this->GetClassName(), string); \
abstract base class for most VTK objects
#define VTK_LOG_EVENT_LENGTH
Timer support and logging.
#define VTKCOMMONSYSTEM_EXPORT
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
static timeval CurrentWallTime
static void SetLogging(int v)
static int TicksPerSecond
static timeval FirstWallTime
static vtkTimerLogEntry * TimerLog
static tms CurrentCpuTicks