> For the complete documentation index, see [llms.txt](https://sryvkver.gitbook.io/cobi.bike/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sryvkver.gitbook.io/cobi.bike/namespaces/motor/power-on-time.md).

# Power On Time

The total operating hours \[h] over lifecycle of the drive unit

{% tabs %}
{% tab title="Typescript" %}

```typescript
const onPowerOnTimeChange = (value: number, timestamp?: Date) => {
    console.log(value, timestamp);
};

COBI.motor.powerOnTime.read(onPowerOnTimeChange); // Instantly get the current value
COBI.motor.powerOnTime.subscribe(onPowerOnTimeChange);
COBI.motor.powerOnTime.unsubscribe(onPowerOnTimeChange);
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const onPowerOnTimeChange = (value, timestamp) => {
    console.log(value, timestamp);
};

COBI.motor.powerOnTime.read(onPowerOnTimeChange); // Instantly get the current value
COBI.motor.powerOnTime.subscribe(onPowerOnTimeChange);
COBI.motor.powerOnTime.unsubscribe(onPowerOnTimeChange);
```

{% endtab %}
{% endtabs %}
