# TimeRange

> A span of time: where it starts and how long it lasts.

Symbols in this group are spelled `otio_time_range_…`. An SDK drops that prefix.

## `before_range`

`otio_time_range_before_range` · method

Returns whether this range ends before another begins.

```c
bool otio_time_range_before_range(
    OtioTimeRange range,
    OtioTimeRange other,
    double epsilon_s);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `other` | `OtioTimeRange` | input |
| `epsilon_s` | `double` | input |

## `before_time`

`otio_time_range_before_time` · method

Returns whether this range ends before an instant.

```c
bool otio_time_range_before_time(
    OtioTimeRange range,
    OtioRationalTime time,
    double epsilon_s);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `time` | `OtioRationalTime` | input |
| `epsilon_s` | `double` | input |

## `begins_range`

`otio_time_range_begins_range` · method

Returns whether another range starts where this one does.

```c
bool otio_time_range_begins_range(
    OtioTimeRange range,
    OtioTimeRange other,
    double epsilon_s);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `other` | `OtioTimeRange` | input |
| `epsilon_s` | `double` | input |

## `begins_time`

`otio_time_range_begins_time` · method

Returns whether this range starts at an instant.

```c
bool otio_time_range_begins_time(
    OtioTimeRange range,
    OtioRationalTime time,
    double epsilon_s);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `time` | `OtioRationalTime` | input |
| `epsilon_s` | `double` | input |

## `clamped_range`

`otio_time_range_clamped_range` · method

Returns the range pulled inside this one, where it lies outside it.

```c
OtioTimeRange otio_time_range_clamped_range(OtioTimeRange range, OtioTimeRange other);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `other` | `OtioTimeRange` | input |

## `clamped_time`

`otio_time_range_clamped_time` · method

Returns the instant pulled inside the range, if it lies outside it.

```c
OtioRationalTime otio_time_range_clamped_time(
    OtioTimeRange range,
    OtioRationalTime time);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `time` | `OtioRationalTime` | input |

## `contains_range`

`otio_time_range_contains_range` · method

Returns whether another range falls entirely inside this one.

```c
bool otio_time_range_contains_range(
    OtioTimeRange range,
    OtioTimeRange other,
    double epsilon_s);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `other` | `OtioTimeRange` | input |
| `epsilon_s` | `double` | input |

## `contains_time`

`otio_time_range_contains_time` · method

Returns whether an instant falls inside the range, the end excluded.

```c
bool otio_time_range_contains_time(OtioTimeRange range, OtioRationalTime time);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `time` | `OtioRationalTime` | input |

## `duration_extended_by`

`otio_time_range_duration_extended_by` · method

Returns the range with its duration lengthened.

```c
OtioTimeRange otio_time_range_duration_extended_by(
    OtioTimeRange range,
    OtioRationalTime by);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `by` | `OtioRationalTime` | input |

## `end_time_exclusive`

`otio_time_range_end_time_exclusive` · getter

Returns the instant just after the range's end.

```c
OtioRationalTime otio_time_range_end_time_exclusive(OtioTimeRange range);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |

## `end_time_inclusive`

`otio_time_range_end_time_inclusive` · getter

Returns the last instant the range covers.

```c
OtioRationalTime otio_time_range_end_time_inclusive(OtioTimeRange range);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |

## `extended_by`

`otio_time_range_extended_by` · method

Returns the smallest range covering both of two ranges.

```c
OtioTimeRange otio_time_range_extended_by(OtioTimeRange range, OtioTimeRange other);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `other` | `OtioTimeRange` | input |

## `finishes_range`

`otio_time_range_finishes_range` · method

Returns whether another range ends where this one does.

```c
bool otio_time_range_finishes_range(
    OtioTimeRange range,
    OtioTimeRange other,
    double epsilon_s);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `other` | `OtioTimeRange` | input |
| `epsilon_s` | `double` | input |

## `finishes_time`

`otio_time_range_finishes_time` · method

Returns whether this range ends at an instant.

```c
bool otio_time_range_finishes_time(
    OtioTimeRange range,
    OtioRationalTime time,
    double epsilon_s);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `time` | `OtioRationalTime` | input |
| `epsilon_s` | `double` | input |

## `from_start_end_time`

`otio_time_range_from_start_end_time` · constructor

Builds a range from its start and the instant after its end.

```c
OtioTimeRange otio_time_range_from_start_end_time(
    OtioRationalTime start_time,
    OtioRationalTime end_time_exclusive);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `start_time` | `OtioRationalTime` | input |
| `end_time_exclusive` | `OtioRationalTime` | input |

## `from_start_end_time_inclusive`

`otio_time_range_from_start_end_time_inclusive` · constructor

Builds a range from its start and its last instant.

```c
OtioTimeRange otio_time_range_from_start_end_time_inclusive(
    OtioRationalTime start_time,
    OtioRationalTime end_time_inclusive);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `start_time` | `OtioRationalTime` | input |
| `end_time_inclusive` | `OtioRationalTime` | input |

## `intersects`

`otio_time_range_intersects` · method

Returns whether two ranges share more than a single boundary instant.

```c
bool otio_time_range_intersects(
    OtioTimeRange range,
    OtioTimeRange other,
    double epsilon_s);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `other` | `OtioTimeRange` | input |
| `epsilon_s` | `double` | input |

## `is_valid`

`otio_time_range_is_valid` · getter

Returns whether a range is usable: valid times and a duration of at least zero.

```c
bool otio_time_range_is_valid(OtioTimeRange range);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |

## `meets`

`otio_time_range_meets` · method

Returns whether this range ends exactly where another begins.

```c
bool otio_time_range_meets(OtioTimeRange range, OtioTimeRange other, double epsilon_s);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `other` | `OtioTimeRange` | input |
| `epsilon_s` | `double` | input |

## `overlaps_range`

`otio_time_range_overlaps_range` · method

Returns whether two ranges share any time at all.

```c
bool otio_time_range_overlaps_range(
    OtioTimeRange range,
    OtioTimeRange other,
    double epsilon_s);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `other` | `OtioTimeRange` | input |
| `epsilon_s` | `double` | input |

## `overlaps_time`

`otio_time_range_overlaps_time` · method

Returns whether an instant falls inside the range, the ends included.

```c
bool otio_time_range_overlaps_time(OtioTimeRange range, OtioRationalTime time);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `range` | `OtioTimeRange` | receiver |
| `time` | `OtioRationalTime` | input |

---

Page: https://otio-rust-docs.vercel.app/reference/time-range/
