CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
OdPerfTimer.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24// AMark : PerfTest timing classes
25
26#ifndef _OdPerfTimer_INCLUDED_
27#define _OdPerfTimer_INCLUDED_
28
29
30#include "OdPlatformSettings.h"
31#include "TD_PackPush.h"
32
38{
39 protected:
41 {
45 OdUInt8 flags[4];
47 : started(0)
48 , stopped(0)
49 , freq(0)
50 {
51 flags[0] = flags[1] = flags[2] = flags[3] = 0;
52 }
53 } gData;
55 public:
56 OdPerfTimerBase() : data(&gData) { }
57
58 virtual ~OdPerfTimerBase() { }
59 virtual void initialize() = 0;
60 virtual void destroy() = 0;
64 virtual void clear() = 0;
68 virtual void start() = 0;
72 virtual void stop() = 0;
76 virtual double countedSec() = 0;
80 virtual OdUInt32 countedMSec() = 0;
84 virtual double permanentSec() = 0;
88 virtual OdUInt32 permanentMSec() = 0;
92 virtual bool isStarted() = 0;
93
95 static void destroyTiming(OdPerfTimerBase *ptr);
96};
97
103{
105 OdPerfTimerWrapper& operator=(const OdPerfTimerWrapper& );
106 OdPerfTimerBase* m_pTimer;
107public:
108
110 {
112 }
113
115 {
117 }
118
120 {
121 return m_pTimer;
122 }
123};
124
125#include "TD_PackPop.h"
126
127#endif
unsigned int OdUInt32
unsigned char OdUInt8
#define FIRSTDLL_EXPORT
Definition: RootExport.h:39
Definition: Int64.h:43
static void destroyTiming(OdPerfTimerBase *ptr)
virtual OdUInt32 countedMSec()=0
virtual bool isStarted()=0
virtual OdUInt32 permanentMSec()=0
virtual void destroy()=0
virtual void stop()=0
InternalData * data
Definition: OdPerfTimer.h:54
virtual void initialize()=0
virtual double countedSec()=0
virtual void clear()=0
static OdPerfTimerBase * createTiming()
virtual ~OdPerfTimerBase()
Definition: OdPerfTimer.h:58
virtual double permanentSec()=0
virtual void start()=0
OdPerfTimerBase * getTimer()
Definition: OdPerfTimer.h:119
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110