# Time Sync Service

# Time Sync Service

This module includes configuration variables for the Time Sync service.

## Summary

| ### Macros ||
|---|---|
| `https://openthread.io/reference/config/group/config-time-sync#group__config-time-sync_1ga16c6471a2e3821925d3f3ec8d10d4ab9 0` | Define as 1 to enable the time synchronization service feature. |
| `https://openthread.io/reference/config/group/config-time-sync#group__config-time-sync_1ga3ec03f84cfb39625abbc454ceff73e77 10000` | This setting sets the minimum amount of time (in microseconds) that the network time must jump due to a time sync event for listeners to be notified of the new network time. |
| `https://openthread.io/reference/config/group/config-time-sync#group__config-time-sync_1ga2f7a263ff61cc37c03b5ab0b4a361d92 30` | Specifies the default period of time synchronization, in seconds. |
| `https://openthread.io/reference/config/group/config-time-sync#group__config-time-sync_1ga67b6264063e2cbfe55b21dc9688d3dcc 0` | Define as 1 to require time synchronization when attaching to a network. |
| `https://openthread.io/reference/config/group/config-time-sync#group__config-time-sync_1ga5646b5b3fa96ff41e19d170874000f74 300` | Specifies the default XTAL threshold for a device to become Router in time synchronization enabled network, in PPM. |

## Macros

### OPENTHREAD_CONFIG_TIME_SYNC_ENABLE

```
 OPENTHREAD_CONFIG_TIME_SYNC_ENABLE 0
```
Define as 1 to enable the time synchronization service feature.

### OPENTHREAD_CONFIG_TIME_SYNC_JUMP_NOTIF_MIN_US

```
 OPENTHREAD_CONFIG_TIME_SYNC_JUMP_NOTIF_MIN_US 10000
```
This setting sets the minimum amount of time (in microseconds) that the network time must jump due to a time sync event for listeners to be notified of the new network time.

### OPENTHREAD_CONFIG_TIME_SYNC_PERIOD

```
 OPENTHREAD_CONFIG_TIME_SYNC_PERIOD 30
```
Specifies the default period of time synchronization, in seconds.

Applicable only if time synchronization service feature is enabled (i.e., OPENTHREAD_CONFIG_TIME_SYNC_ENABLE is set).

### OPENTHREAD_CONFIG_TIME_SYNC_REQUIRED

```
 OPENTHREAD_CONFIG_TIME_SYNC_REQUIRED 0
```
Define as 1 to require time synchronization when attaching to a network.

If the device is router capable and cannot find a neighboring router supporting time synchronization, the device will form a new partition. If the device is not router capable, the device will remain an orphan.

Applicable only if time synchronization service feature is enabled (i.e., OPENTHREAD_CONFIG_TIME_SYNC_ENABLE is set)

### OPENTHREAD_CONFIG_TIME_SYNC_XTAL_THRESHOLD

```
 OPENTHREAD_CONFIG_TIME_SYNC_XTAL_THRESHOLD 300
```
Specifies the default XTAL threshold for a device to become Router in time synchronization enabled network, in PPM.

Applicable only if time synchronization service feature is enabled (i.e., OPENTHREAD_CONFIG_TIME_SYNC_ENABLE is set)

## Resources

OpenThread API Reference topics originate from the source code, available
on [GitHub](https://github.com/openthread/openthread/tree/main/include/openthread).
For more information, or to contribute to our documentation, refer to
[Resources](https://openthread.io/resources).