---
title: DiscreteTimeInterval
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/discretetimeinterval
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/discretetimeinterval.md
last_updated: 2026-11-30
generated_at: 2026-11-30T20:57:04.756Z
locale: en-us
---

# DiscreteTimeInterval

> Structure representing a time interval.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Animations](/engine/7000.0/script-reference/unity/animations.md)
* **Assembly:** [UnityEngine.AnimationCoreModule](/engine/7000.0/script-reference/modules/unityengine-animationcoremodule.md)
* **Implements:** [IEquatable\<DiscreteTimeInterval>](https://learn.microsoft.com/dotnet/api/system.iequatable-1), [IFormattable](https://learn.microsoft.com/dotnet/api/system.iformattable)

```csharp
public struct DiscreteTimeInterval : IEquatable<DiscreteTimeInterval>, IFormattable
```

## Fields

| Value                                                                                   | Description                       |
| --------------------------------------------------------------------------------------- | --------------------------------- |
| [End](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/end.md)     | The ending time of the interval   |
| [Start](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/start.md) | The starting time of the interval |

## Static Fields

| Value                                                                                           | Description                                                                                                                       |
| ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| [MaxRange](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/maxrange.md)   | The largest time interval that a [DiscreteTime](/engine/7000.0/script-reference/unity/integertime/discretetime.md) can represent. |
| [UnitRange](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/unitrange.md) | Unit time interval \[0, 1]                                                                                                        |

## Constructors

| Constructor                                                                                                                                                          | Description                            |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| [DiscreteTimeInterval(Unity.IntegerTime.DiscreteTime,Unity.IntegerTime.DiscreteTime)](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/ctor.md) | Creates an interval between two times. |

## Properties

| Property                                                                                                  | Description                                           |
| --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [Duration](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/duration.md)             | The duration of the interval                          |
| [DurationAsTick](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/durationastick.md) | The duration of the interval, in ticks, as a `ulong`. |

## Methods

| Method                                                                                              | Description                                                                  |
| --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [Clamp](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/clamp.md)             | Limits a time value to the interval.                                         |
| [Contains](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/contains.md)       | Checks whether a time value is inside the interval.                          |
| [Equals](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/equals.md)           | Determines whether this interval equals another object.                      |
| [GetHashCode](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/gethashcode.md) | Computes a hash code for the interval.                                       |
| [Overlaps](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/overlaps.md)       | Checks whether another interval overlaps this interval.                      |
| [ToString](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/tostring.md)       | Converts the interval to a string.                                           |
| [Union](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/union.md)             | Returns the smallest interval containing both this interval and another one. |
