tf_privacy.restart_query.PeriodicTimeRestartIndicator

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

Inherits From: RestartIndicator

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

period_seconds The next function will return True if called after period_seconds.

Methods

initialize

View source

Returns initial time as state.

next

View source

Gets next bool indicator and advances the state.

Args
state The current state.

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