Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Tools/Debugging/Stopwatch.h File Reference

Makros and for the Stopwatch. More...

#include "Tools/Debugging/Debugging.h"
#include "Platform/SystemCall.h"
#include "Platform/GTAssert.h"

Include dependency graph for Stopwatch.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class  Stopwatch
 Provides IDs and names for different stopwatch tasks; makros are used to provide real stopwatch functionality with that. More...


Defines

#define STOP_TIME_ON_REQUEST(eventID, expression)
 Stops the execution time of "expression" if a DebugKey is set for the eventID.

#define STOP_TIME(expression)
 Starts a StopWatch without an id.


Detailed Description

Makros and for the Stopwatch.

Author:
Matthias Jüngel

Definition in file Stopwatch.h.


Define Documentation

#define STOP_TIME_ON_REQUEST eventID,
expression   ) 
 

Value:

if (getDebugKeyTable().isActive(Stopwatch::getDebugKeyID(Stopwatch::eventID))) \
{\
  unsigned long eventID##StartTime; \
  static unsigned long evendID##Counter = 0; \
  eventID##StartTime = SystemCall::getCurrentSystemTime();\
  expression \
  OUTPUT(idStopwatch, bin, (char) Stopwatch::eventID << eventID##StartTime << SystemCall::getCurrentSystemTime() << evendID##Counter++)\
}\
  else {expression}\
Stops the execution time of "expression" if a DebugKey is set for the eventID.

The start and stop times are sent as a idStopwatch message to RobotControl

Definition at line 110 of file Stopwatch.h.

Referenced by Motion::main(), and Cognition::main().

#define STOP_TIME expression   ) 
 

Value:

{\
  unsigned long stopwatchStartTime = SystemCall::getCurrentSystemTime();\
  expression\
  OUTPUT(idText, text, "Stopwatch: " << SystemCall::getTimeSince(stopwatchStartTime) << "ms")\
}\
Starts a StopWatch without an id.

Definition at line 125 of file Stopwatch.h.


Generated on Thu Sep 23 20:02:03 2004 for GT2004 by doxygen 1.3.6