37 #include "vtkCommonSystemModule.h"
41 #include <sys/types.h>
42 #include <sys/timeb.h>
46 #include <sys/types.h>
47 #include <sys/times.h>
57 # define SELECT_MASK fd_set
63 # define SELECT_MASK void
65 # define SELECT_MASK int
70 #define VTK_LOG_EVENT_LENGTH 40
101 static void SetMaxEntries(
int a);
102 static int GetMaxEntries();
109 static void FormatAndMarkEvent(
const char *EventString, ...);
115 static void DumpLog(
const char *filename);
123 static void MarkStartEvent(
const char *EventString);
124 static void MarkEndEvent(
const char *EventString);
127 static void DumpLogWithIndents(ostream *os,
double threshold);
128 static void DumpLogWithIndentsAndPercentages(ostream *os);
134 static int GetNumberOfEvents();
135 static int GetEventIndent(
int i);
136 static double GetEventWallTime(
int i);
137 static const char* GetEventString(
int i);
143 static void MarkEvent(
const char *EventString);
149 static void ResetLog();
154 static void AllocateLog();
159 static void CleanupLog();
165 static double GetUniversalTime();
171 static double GetCPUTime();
187 double GetElapsedTime();
205 static timeb FirstWallTime;
206 static timeb CurrentWallTime;
208 static FILETIME FirstWallTime;
209 static FILETIME CurrentWallTime;
223 static void DumpEntry(ostream& os,
int index,
double time,
double deltatime,
224 int tick,
int deltatick,
const char *event);
228 void operator=(const
vtkTimerLog&) VTK_DELETE_FUNCTION;
235 #define vtkTimerLogMacro(string) \
237 vtkTimerLog::FormatAndMarkEvent("Mark: In %s, line %d, class %s: %s", \
238 __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.
#define VTK_LOG_EVENT_LENGTH
Timer support and logging.
a simple class to control print indentation
static timeval CurrentWallTime
static void SetLogging(int v)
This flag will turn loging 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 vtkTimerLogEntry * TimerLog
static tms CurrentCpuTicks