HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_TimerTable.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_TimerTable.h ( UT Library, C++)
7  *
8  * COMMENTS: Class to keep track of cumulative time spent in different
9  * algorithms.
10  */
11 
12 #ifndef __UT_TimerTable__
13 #define __UT_TimerTable__
14 
15 #include "UT_API.h"
16 #include <SYS/SYS_Compiler.h>
17 
18 class UT_WorkBuffer;
19 
20 // Add new algorithms here. There must be a matching entry in theUsers in
21 // the UT_TimerTable.C
24 
29 
30  UT_MAX_TIMER_USERS // Sentinal
31 };
32 
34 public:
35  // Start a timer. Nested timers are ignored.
36  static void start(UT_TimerTableUser user);
37  static void stop(UT_TimerTableUser user);
38 
39  static void printUsage(UT_WorkBuffer &buf, int indent=3);
40 };
41 
42 // Automatically starts and stops a timer within the scope of a
43 // UT_AutoTimerTable object.
45 public:
47  : myUser(user)
48  {
49  UT_TimerTable::start(myUser);
50  }
52  {
53  UT_TimerTable::stop(myUser);
54  }
55 
56 private:
57  UT_TimerTableUser myUser;
58 };
59 
60 #endif
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
GLuint start
Definition: glcorearb.h:475
#define UT_API
Definition: UT_API.h:14
UT_AutoTimerTable(UT_TimerTableUser user)
Definition: UT_TimerTable.h:46
#define SYS_NO_DISCARD_RESULT
Definition: SYS_Compiler.h:93
UT_TimerTableUser
Definition: UT_TimerTable.h:22
static void start(UT_TimerTableUser user)
static void stop(UT_TimerTableUser user)