# tf_privacy.restart_query.PeriodicTimeRestartIndicator

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/privacy/blob/v0.9.0/privacy/privacy/dp_query/restart_query.py#L105-L146) |

Indicator for periodically resetting the tree state after a certain time.

Inherits From: [`RestartIndicator`](https://www.tensorflow.org/responsible_ai/privacy/api_docs/python/tf_privacy/restart_query/RestartIndicator)

    tf_privacy.restart_query.PeriodicTimeRestartIndicator(
        period_seconds: float
    )

The indicator will maintain a state to track the previous restart time.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `period_seconds` | The `next` function will return `True` if called after `period_seconds`. |

<br />

## Methods

### `initialize`

[View source](https://github.com/tensorflow/privacy/blob/v0.9.0/privacy/privacy/dp_query/restart_query.py#L123-L126)

    @tf.function
    initialize()

Returns initial time as state.

### `next`

[View source](https://github.com/tensorflow/privacy/blob/v0.9.0/privacy/privacy/dp_query/restart_query.py#L128-L146)

    @tf.function
    next(
        state
    )

Gets next bool indicator and advances the state.

<br />

<br />

<br />

| Args ||
|---|---|
| `state` | The current state. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| A pair (value, new_state) where value is the bool indicator and new_state of time. ||

<br />