# Last Sample Repeat

By default time series creates samples only if the associated data source is changed. Optionally you can add behavior where the new sample will be created if the data source is not changed within *RepeatLastSampleFactor* *✕ DataSource.UpdateRate* time interval (in milliseconds). The new sample time will differ *RepeatLastSampleFactor* *✕ DataSource.UpdateRate* from the current one, and the value will be equal to the current sample value. Thus the combined mode of writing data to the store is implemented:&#x20;

* Generation of time series sample in case data source changes. &#x20;
* Cycling of the current sample in case data source doesn’t change.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.monokot.io/time-series-and-stores/time-series/last-sample-repeat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
