> ## Documentation Index
> Fetch the complete documentation index at: https://notevil.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CAPLfunctionLINGetWakeupDuration

[Open topic with navigation](../../../../../CANoeDEFamily.htm#Topics/CAPLFunctions/LIN/Functions/CAPLfunctionLINGetWakeupDuration.md)

**CAPL Functions** » [LIN](../CAPLfunctionsLINOverview.md) » linGetWakeupDuration

# linGetWakeupDuration

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

**Note**\
[LIN bus statistics](../CAPLfunctionsLINOverview.md#BMBusStatistics) is deactivated by default and must be activated before calling this function. You can do this by calling function [linEnableStatistics](CAPLfunctionLINEnableStatistics.md) in an **on start {}** handler, see example below.

## Function Syntax

```plaintext theme={null}
long linGetWakeupDuration(long channel, ValueSelector selector);
```

## Description

Gets the duration of wake-up requests of a LIN channel in microseconds. The kind of value to be returned (average, current, maximum or minimum) can be selected.

## Parameters

* **channel**: LIN channel (1…64).
* **selector**: Value selector:
  * eCurrValue = current
  * eMinValue = minimum
  * eMaxValue = maximum
  * eAvgValue = average

## Return Values

Duration of wake-up requests in microseconds, if LIN statistics is enabled; 0 otherwise.

## Example

```plaintext theme={null}
on start
{
  linEnableStatistics(1, 1); // Enable LIN statistics on channel 1
}

void myStatisticFunc()
{
  long value;

  value = linGetWakeupDuration(1, eAvgValue); // Average wake-up duration on channel 1
  // … do something with the value, e.g.:
  write("Average wake-up duration: %i [us]", value);
}
```
