# `Mailglass.Clock.Frozen`
[🔗](https://github.com/szTheory/mailglass/blob/v0.1.0/lib/mailglass/clock/frozen.ex#L1)

Test helper that freezes `Mailglass.Clock.utc_now/0` in the current
process. Per-process isolation makes it `async: true`-safe.

`Mailglass.Adapters.Fake.advance_time/1` delegates to `advance/1` — one
mechanism, not two (D-03 + D-07).

# `advance`
*since 0.1.0* 

```elixir
@spec advance(integer()) :: DateTime.t()
```

Advances the frozen clock by `ms` milliseconds in the current process.

If no freeze is active, seeds from `DateTime.utc_now/0` then adds `ms`.
Returns the new frozen `DateTime`.

# `freeze`
*since 0.1.0* 

```elixir
@spec freeze(DateTime.t()) :: DateTime.t()
```

Freezes the clock at the given `DateTime` in the current process.

Returns the frozen `DateTime`. Subsequent calls to `Mailglass.Clock.utc_now/0`
in this process return the frozen value until `unfreeze/0` is called.

# `unfreeze`
*since 0.1.0* 

```elixir
@spec unfreeze() :: :ok
```

Clears the clock freeze in the current process.

Returns `:ok`. Subsequent calls to `Mailglass.Clock.utc_now/0` delegate
to the configured impl (or `Mailglass.Clock.System`).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
