37#include "vtkCommonSystemModule.h"
57# define SELECT_MASK fd_set
63# define SELECT_MASK void
65# define SELECT_MASK int
70#define VTK_LOG_EVENT_LENGTH 40
205 static timeb FirstWallTime;
206 static timeb CurrentWallTime;
208 static FILETIME FirstWallTime;
209 static FILETIME CurrentWallTime;
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); \
a simple class to control print indentation
abstract base class for most VTK objects
Timer support and logging.
static double GetUniversalTime()
Returns the elapsed number of seconds since January 1, 1970.
static tms CurrentCpuTicks
static void FormatAndMarkEvent(const char *EventString,...)
Record a timing event.
static void AllocateLog()
Allocate timing table with MaxEntries elements.
static timeval CurrentWallTime
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static const char * GetEventString(int i)
static vtkTimerLogEntry * GetEvent(int i)
static double GetEventWallTime(int i)
static int GetNumberOfEvents()
Programatic access to events.
static int TicksPerSecond
static void CleanupLog()
Remove timer log.
static void MarkEndEvent(const char *EventString)
static void SetMaxEntries(int a)
Set/Get the maximum number of entries allowed in the timer log.
static void ResetLog()
Clear the timing table.
static void DumpLogWithIndentsAndPercentages(ostream *os)
void StopTimer()
Sets EndTime to the current time.
static void SetLogging(int v)
This flag will turn loging of events off or on.
static timeval FirstWallTime
static vtkTimerLogEntry * TimerLog
static double GetCPUTime()
Returns the CPU time for this process On Win32 platforms this actually returns wall time.
static int GetEventIndent(int i)
static vtkTimerLog * New()
static void MarkEvent(const char *EventString)
Record a timing event and capture wall time and cpu ticks.
static int GetMaxEntries()
double GetElapsedTime()
Returns the difference between StartTime and EndTime as a doubleing point value indicating the elapse...
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.
static void DumpLogWithIndents(ostream *os, double threshold)
void StartTimer()
Set the StartTime to the current time.
static void DumpEntry(ostream &os, int index, double time, double deltatime, int tick, int deltatick, const char *event)
static void DumpLog(const char *filename)
Write the timing table out to a file.
#define VTK_LOG_EVENT_LENGTH