My Project: dynamics.mod/NewtonDynamics/source/core/dgThreadProfiler.h Source File

My Project

dgThreadProfiler.h
Go to the documentation of this file.
1 /* Copyright (c) <2003-2011> <Julio Jerez, Newton Game Dynamics>
2 *
3 * This software is provided 'as-is', without any express or implied
4 * warranty. In no event will the authors be held liable for any damages
5 * arising from the use of this software.
6 *
7 * Permission is granted to anyone to use this software for any purpose,
8 * including commercial applications, and to alter it and redistribute it
9 * freely, subject to the following restrictions:
10 *
11 * 1. The origin of this software must not be misrepresented; you must not
12 * claim that you wrote the original software. If you use this software
13 * in a product, an acknowledgment in the product documentation would be
14 * appreciated but is not required.
15 *
16 * 2. Altered source versions must be plainly marked as such, and must not be
17 * misrepresented as being the original software.
18 *
19 * 3. This notice may not be removed or altered from any source distribution.
20 */
21
22 #ifndef __DG_THREAD_PROFILER_H__
23 #define __DG_THREAD_PROFILER_H__
24
25 #include "dgList.h"
26
27 #define DG_PROFILER_EVENT_NAME_SIZE 32
28
29 class dgThreadProfiler
30 {
31 public:
32 class dgEvent
33 {
34 public:
35 char m_name[ DG_PROFILER_EVENT_NAME_SIZE];
36 dgUnsigned32 m_startTime;
37 dgUnsigned32 m_duration;
38 };
39
40 dgThreadProfiler ();
41 dgThreadProfiler (const char* const name, dgInt32 id);
42 virtual ~dgThreadProfiler ();
43
44 dgUnsigned32 m_startTime;
45 dgUnsigned32 m_endTime;
46 dgList<dgEvent> m_events;
47 };
48
49
50
51 #endif
dgInt32
int dgInt32
Definition: dgTypes.h:218
dgList
Definition: dgList.h:33
dgList.h
DG_PROFILER_EVENT_NAME_SIZE
#define DG_PROFILER_EVENT_NAME_SIZE
Definition: dgThreadProfiler.h:27
dgThreadProfiler::m_endTime
dgUnsigned32 m_endTime
Definition: dgThreadProfiler.h:45
dgUnsigned32
unsigned dgUnsigned32
Definition: dgTypes.h:219
dgThreadProfiler::dgEvent
Definition: dgThreadProfiler.h:32
dgThreadProfiler::m_events
dgList< dgEvent > m_events
Definition: dgThreadProfiler.h:46
dgThreadProfiler::dgEvent::m_name
char m_name[DG_PROFILER_EVENT_NAME_SIZE]
Definition: dgThreadProfiler.h:35
dgThreadProfiler::dgEvent::m_duration
dgUnsigned32 m_duration
Definition: dgThreadProfiler.h:37
dgThreadProfiler::dgThreadProfiler
dgThreadProfiler()
dgThreadProfiler::dgEvent::m_startTime
dgUnsigned32 m_startTime
Definition: dgThreadProfiler.h:36
dgThreadProfiler::m_startTime
dgUnsigned32 m_startTime
Definition: dgThreadProfiler.h:44
dgThreadProfiler::~dgThreadProfiler
virtual ~dgThreadProfiler()
dgThreadProfiler
Definition: dgThreadProfiler.h:29