QuantifyStartRecordingData
QuantifyIsRecordingData
QuantifyStopRecordingData examples

Visual C++

#include <windows.h>

#include <stdio.h>

#include "pure.h"

 

void main()

{

   int x;

   QuantifyStopRecordingData();

 

   //The preceding line causes Quantify to stop recording
   //performance data.

 

   printf("'0' indicates Quantify has stopped recording all \

   performance data: %d\n", x=QuantifyIsRecordingData());

 

   //The preceding line causes a "0" to be printed, verifying
   //that Quantify has changed the recording state and,
   //in this case, is no longer recording data.

 

   InputFunctionA();

   printf("'1' indicates Quantify is again recording all \

          profiling \

          data: %d\n", x=QuantifyStartRecordingData());

 

   //The preceding line starts the recording of performance data
   //and also prints out the value the function returns, as
   //verification that the recording state has changed.

 

   ComputationFunctionB();

   ComputationFunctionC();

   OutputFunctionD();

}

 

Visual Basic

Dim status As Integer

...

 

   If QuantifyIsRunning() = 1 Then

 

      status = QuantifyStartRecordingData()

      Text1.Text = Text1.Text & "QuantifyIsRecordingData = " & retCode

         & vbCrLf

      If QuantifyIsRecordingData() = 1 Then

         MsgBox "Quantify started recording"

      End If

 

      status = QuantifyStopRecordingData()

      If status = 1 Then

         MsgBox "Quantify stopped recording data"

      End If

 

   End If

(C) Copyright IBM Corporation 1993, 2009.