---
title: "distance(to:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/runloop/schedulertimetype/distance(to:)"
---

# distance(to:)

Returns the distance to another run loop scheduler time.

## Declaration

```swift
func distance(to other: RunLoop.SchedulerTimeType) -> RunLoop.SchedulerTimeType.Stride
```

## Parameters

- `other`: Another run loop time.

## Return Value

Return Value The time interval between this time and the provided time.

## See Also

### Working with Scheduler Time Intervals

- [RunLoop.SchedulerTimeType.Stride](foundation/runloop/schedulertimetype/stride.md)
- [advanced(by:)](foundation/runloop/schedulertimetype/advanced(by:).md)
