# IClock

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/animation/trait-iclock/

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

```rust
trait IClock: IObservable<crate::animation::SignedDuration> + 'static
```

A source of animation time: an observable that produces the time elapsed
since the clock started, once per frame.

Every timing decision in the animation system is derived from the values
a clock produces; nothing reads a system timer.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_clock.rs#L9)

## Members

- [`play_state`](#function-play_state)
- [`set_play_state`](#function-set_play_state)

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

### play_state

```rust
fn play_state(self: &Self) -> PlayState
```

The playback state of the clock.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_clock.rs#L11)

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

### set_play_state

```rust
fn set_play_state(self: &Self, value: PlayState)
```

Sets the playback state of the clock.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/i_clock.rs#L14)

## Trait implementations

- [`IClock`](/docs/0.5.0/api/ferroui-base/animation/trait-iclock/)

## Availability

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