[#BloombergLP-ball-FileObserver-rotateOnTimeInterval-02]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/FileObserver.adoc[FileObserver]::rotateOnTimeInterval
:relfileprefix: ../../../
:mrdocs:

`rotateOnTimeInterval` overloads

== Synopses

Declared in `&lt;ball&lowbar;fileobserver&period;h&gt;`

Set this file observer to perform a periodic log file rotation at multiples of the specified `interval`&period; Optionally specify a `startTime` indicating the datetime to use as the starting point for computing the periodic rotation schedule&period; If `isPublishInLocalTimeEnabled` is `true`, the `startTime` is interpreted as local time, and as a UTC time otherwise&period; If `startTime` is not specified, the current time is used&period; This rule replaces any rotation&hyphen;on&hyphen;time&hyphen;interval rule currently in effect&period; The behavior is undefined unless `0 &lt; interval&period;totalMilliseconds()`&period; Note that `startTime` may be a fixed time in the past&semi; e&period;g&period;, a reference time of `bdlt&colon;&colon;Datetime(1, 1, 1)` and an interval of 24 hours would configure a periodic rotation at midnight each day&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/ball/FileObserver/rotateOnTimeInterval-00.adoc[rotateOnTimeInterval](xref:BloombergLP/bdlt/DatetimeInterval.adoc[bdlt::DatetimeInterval] const& interval);
----

[.small]#xref:BloombergLP/ball/FileObserver/rotateOnTimeInterval-00.adoc[_» more&period;&period;&period;_]#

Configure periodic log rotation with the specified `interval` and `startTime`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/ball/FileObserver/rotateOnTimeInterval-0f.adoc[rotateOnTimeInterval](
    xref:BloombergLP/bdlt/DatetimeInterval.adoc[bdlt::DatetimeInterval] const& interval,
    xref:BloombergLP/bdlt/Datetime.adoc[bdlt::Datetime] const& startTime);
----

[.small]#xref:BloombergLP/ball/FileObserver/rotateOnTimeInterval-0f.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
