[#absl-InfiniteDuration]
= xref:absl.adoc[absl]::InfiniteDuration
:relfileprefix: ../
:mrdocs:

Returns an infinite `Duration`&period; To get a `Duration` representing negative infinity, use `&hyphen;InfiniteDuration()`&period;

== Synopsis

Declared in `&lt;absl&sol;time&sol;time&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:absl/Duration.adoc[Duration]
InfiniteDuration();
----

== Description

Duration arithmetic overflows to &plus;&sol;&hyphen; infinity and saturates&period; In general, arithmetic with `Duration` infinities is similar to IEEE 754 infinities except where IEEE 754 NaN would be involved, in which case &plus;&sol;&hyphen; `InfiniteDuration()` is used in place of a &quot;nan&quot; Duration&period;

Examples&colon;

constexpr absl&colon;&colon;Duration inf &equals; absl&colon;&colon;InfiniteDuration()&semi; const absl&colon;&colon;Duration d &equals; &period;&period;&period; any finite duration &period;&period;&period;

inf &equals;&equals; inf &plus; inf inf &equals;&equals; inf &plus; d inf &equals;&equals; inf &hyphen; inf &hyphen;inf &equals;&equals; d &hyphen; inf

inf &equals;&equals; d &ast; 1e100 inf &equals;&equals; inf &sol; 2 0 &equals;&equals; d &sol; inf INT64&lowbar;MAX &equals;&equals; inf &sol; d

d &lt; inf &hyphen;inf &lt; d

&sol;&sol; Division by zero returns infinity, or INT64&lowbar;MIN&sol;MAX where appropriate&period; inf &equals;&equals; d &sol; 0 INT64&lowbar;MAX &equals;&equals; d &sol; absl&colon;&colon;ZeroDuration()

The examples involving the `&sol;` operator above also apply to `IDivDuration()` and `FDivDuration()`&period;

== Return Value

An infinite duration&period;


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