# null

[Open topic with navigation](../../../../../CANoeDEFamily.htm#Topics/CAPLFunctions/Other/Methods/CAPLfunctionCAPLProfilerStart.md)

[CAPL Functions](../../CAPLfunctions.md) » [General](../CAPLGeneralStartPage.md) » [Function Overview](../CAPLfunctionsGeneralOverview.md) » CAPLProfiler::Start

# CAPLProfiler::Start

[Valid for](../../../Shared/FeatureAvailability.md): CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

## Function Syntax

```plaintext
long CAPLProfiler::Start();
```

## Description

Starts the time measurement of the profiler. It will run until Stop() has been called as many times as Start() has been called. Then the measured time is used to update the statistics of the profiler.

## Parameters

—

## Return Values

* **0**: Success
* **> 0**: Profiler was already running. You will need to call Stop once for each Start call.

## Example

```plaintext
void MyFunctionProfiler()
{
  CAPLProfiler profiler;
  char avgTimeString[20]; char maxTimeString[20];
  profiler.Start();

  MyFunction();
  
  profiler.Stop();
  TimeToString(profiler.GetAverageCallTimeNS(), avgTimeString);
  TimeToString(profiler.GetMaximumCallTimeNS(), maxTimeString);
  Write("MyFunction execution time: %s on average, %s maximum", avgTimeString, maxTimeString);
}
```

[Stop](CAPLfunctionCAPLProfilerStop.md) • [Rest](CAPLfunctionCAPLProfilerReset.md) • GetAverageCallTimeNS
