37 #include "vtkCommonSystemModule.h"
43 #include <sys/timeb.h>
44 #include <sys/types.h>
47 #include <sys/times.h>
48 #include <sys/types.h>
59 #define SELECT_MASK fd_set
65 #define SELECT_MASK void
67 #define SELECT_MASK int
116 static void SetMaxEntries(
int a);
117 static int GetMaxEntries();
125 static void FormatAndMarkEvent(
const char* format, ...) VTK_FORMAT_PRINTF(1, 2);
142 static void MarkStartEvent(
const char* EventString);
143 static void MarkEndEvent(
const char* EventString);
151 static void InsertTimedEvent(
const char* EventString,
double time,
int cpuTicks);
154 static void DumpLogWithIndents(ostream* os,
double threshold);
155 static void DumpLogWithIndentsAndPercentages(ostream* os);
161 static int GetNumberOfEvents();
162 static int GetEventIndent(
int i);
163 static double GetEventWallTime(
int i);
164 static const char* GetEventString(
int i);
171 static void MarkEvent(
const char* EventString);
177 static void ResetLog();
182 static void CleanupLog();
188 static double GetUniversalTime();
194 static double GetCPUTime();
210 double GetElapsedTime();
229 static timeb FirstWallTime;
230 static timeb CurrentWallTime;
232 static FILETIME FirstWallTime;
233 static FILETIME CurrentWallTime;
255 static void DumpEntry(ostream& os,
int index,
double time,
double deltatime,
int tick,
256 int deltatick,
const char* event);
291 #define vtkTimerLogMacro(string) \
293 vtkTimerLog::FormatAndMarkEvent( \
294 "Mark: In %s, line %d, class %s: %s", __FILE__, __LINE__, this->GetClassName(), string); \
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkTimerLogCleanup vtkTimerLogCleanupInstance
Helper class to log time within scope.
static void MarkStartEvent(const char *EventString)
I want to time events, so I am creating this interface to mark events that have a start and an end...
Timer support and logging.
a simple class to control print indentation
static timeval CurrentWallTime
vtkTimerLogScope(const char *eventString)
static void SetLogging(int v)
This flag will turn logging of events off or on.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
static int TicksPerSecond
static timeval FirstWallTime
static tms CurrentCpuTicks
static void MarkEndEvent(const char *EventString)
I want to time events, so I am creating this interface to mark events that have a start and an end...