# TestSchedulerExtensions

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui-testing/trait-testschedulerextensions/

**trait** · [`ferroui-reactiveui-testing`](/docs/0.5.0/api/ferroui-reactiveui-testing/) · v0.5.0

```rust
trait TestSchedulerExtensions
```

The virtual time of a `TestScheduler` in milliseconds, and recorded notifications at a time in
milliseconds (`TestSchedulerExtensions`, from ReactiveUI.Testing.Reactive).

The functions without a scheduler are called on the type, as upstream's static extension
members are: `TestScheduler::on_next_at(100.0, 42)`.

Not ported: the `ArgumentException` of a time that is not a number and the
`OverflowException` of one too large for a `TimeSpan` - argument validation (the conversion
saturates).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Testing/test_scheduler_extensions.rs#L25)

## Members

- [`from_time_span`](#function-from_time_span)
- [`on_next_at`](#function-on_next_at)
- [`on_error_at`](#function-on_error_at)
- [`on_completed_at`](#function-on_completed_at)
- [`advance_to_ms`](#function-advance_to_ms)
- [`advance_by_ms`](#function-advance_by_ms)

<a id="function-from_time_span"></a>

### from_time_span

```rust
fn from_time_span(span: Duration) -> i64
```

The ticks of the virtual time of a duration (`FromTimeSpan`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Testing/test_scheduler_extensions.rs#L27)

<a id="function-on_next_at"></a>

### on_next_at

```rust
fn on_next_at<T>(milliseconds: f64, value: T) -> Recorded<Notification<T>>
```

A value at a time in milliseconds (`OnNextAt<T>(double, T)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Testing/test_scheduler_extensions.rs#L30)

<a id="function-on_error_at"></a>

### on_error_at

```rust
fn on_error_at<T>(milliseconds: f64, error: ObservableError) -> Recorded<Notification<T>>
```

An error at a time in milliseconds (`OnErrorAt<T>(double, Exception)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Testing/test_scheduler_extensions.rs#L33)

<a id="function-on_completed_at"></a>

### on_completed_at

```rust
fn on_completed_at<T>(milliseconds: f64) -> Recorded<Notification<T>>
```

The end of a sequence at a time in milliseconds (`OnCompletedAt<T>(double)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Testing/test_scheduler_extensions.rs#L36)

<a id="function-advance_to_ms"></a>

### advance_to_ms

```rust
fn advance_to_ms(self: &Self, milliseconds: f64)
```

Runs the scheduler until its clock reaches the absolute time in milliseconds
(`AdvanceToMs`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Testing/test_scheduler_extensions.rs#L40)

<a id="function-advance_by_ms"></a>

### advance_by_ms

```rust
fn advance_by_ms(self: &Self, milliseconds: f64)
```

Runs the scheduler for a time in milliseconds (`AdvanceByMs`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Testing/test_scheduler_extensions.rs#L43)

## Trait implementations

- [`TestSchedulerExtensions`](/docs/0.5.0/api/ferroui-reactiveui-testing/trait-testschedulerextensions/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
