![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
Developer Tool Programmer Interface.
Inherits From:
TTimingTest
Inherited By:
None.
Purpose:
An abstract framework class derived from TTimingTest. Clients should write derived classes of TStartStopTimingTest to accomplish timing measurements too complicated to achieve with TTimingTest. TStartStopTimingTest is less accurate than TTimingTest, so it should not be used if TTimingTest can be used.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Clients must derive this class to use it and override StartStopTimingTest and optionally EmptyStartStopTimingTest.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
virtual void StartStopTimingTest (TTimingTestStopwatch &)
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Derived classes must override StartStopTimingTest. In the overridden StartStopTimingTest function, clients should do any setup necessary, then start the timer (which is passed into the function), then do the timed operation, then stop the timer, then do any cleanup necessary.
Calling Context:
Called by framework. Do not call this function directly.
Parameters:
- TTimingTestStopwatch & -This is the stopwatch object that clients should start and stop in order to time the desired operation. If necessary, the timer can be started and stopped more than once, but avoided this if at all possible. The StartStopTimingTest function should always assume the timer is stopped on entry into the function, and should always stop the timer before exiting the function.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TStartStopTimingTest::EmptyStartStopTimingTest
virtual void EmptyStartStopTimingTest (TTimingTestStopwatch &)
Interface Category:
Developer Tool Programmer Interface.
Purpose:
If the StartStopTimingTest function stops and starts the timer exactly once, then you do not need to override this function. On the other hand, if your StartStopTimingTest function starts and stops the timer more than once, then you should override EmptyStartStopTimingTest.
Calling Context:
Called by framework. Do not call this function directly.
Parameters:
- TTimingTestStopwatch & -This is the stopwatch object which clients should start and stop. In your overridden version, start and stop this object as many times as you do in StartStopTimingTest, for example: Start, stop, start, stop. TStartStopTimingTest uses this function to calibrate times and account for the overhead involved in starting or stopping the timer.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TStartStopTimingTest & operator =(const TStartStopTimingTest & other)
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- TStartStopTimingTest (const TStartStopTimingTest & other)
- TStartStopTimingTest ()
- TStartStopTimingTest (unsigned long timingCount, unsigned long sampleCount)
- TStartStopTimingTest (unsigned long timingCount, unsigned long sampleCount, bool doPCSampling, bool continuallyCalibrate, bool timingIsOn)
Interface Category:
Developer Tool Programmer Interface.
Purpose:
- Copy constructor.
- Default constructor.
- Constructor which takes the timing count and the sample count.
- Constructor which takes the timing count, the sample count, the flag for PCSampling (program counter sampling), the flag for calibration, and the flag for whether timing is on.
Calling Context:
- Called to copy an object.
- Called by the stream-in operators.
- Call this function directly.
- Call this function directly.
Parameters:
- const TStartStopTimingTest & other -The object to be copied.
- Takes no parameters.
- unsigned long timingCount -The timing count.
- unsigned long sampleCount -The sample count.
- unsigned long timingCount -The timing count.
- unsigned long sampleCount -The sample count.
- bool doPCSampling -A flag indicating whether to do PC Sampling.
- bool continuallyCalibrate -A flag indicating where calibration is done continually.
- bool timingIsOn -A flag indicating whether timing is on.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TStartStopTimingTest ()
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.