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 {
35 public:
36  // Start a timer. Nested timers are ignored.
37  static void start(UT_TimerTableUser user);
38  static void stop(UT_TimerTableUser user);
39 
40  static void printUsage(UT_WorkBuffer &buf, int indent=3);
41 };
42 
43 // Automatically starts and stops a timer within the scope of a
44 // UT_AutoTimerTable object.
46 {
47 public:
49  : myUser(user)
50  {
51  UT_TimerTable::start(myUser);
52  }
54  {
55  UT_TimerTable::stop(myUser);
56  }
57 
58 private:
59  UT_TimerTableUser myUser;
60 };
61 
62 #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:48
#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)