# `Accrue.Test.Clock`
[🔗](https://github.com/szTheory/accrue/blob/accrue-v0.3.0/lib/accrue/test/clock.ex#L1)

Deterministic clock helpers for host tests.

The helper drives `Accrue.Processor.Fake` directly and never sleeps.

# `duration`

```elixir
@type duration() ::
  binary()
  | integer()
  | [
      months: integer(),
      days: integer(),
      hours: integer(),
      minutes: integer(),
      seconds: integer()
    ]
```

# `advance`

```elixir
@spec advance(term(), duration()) :: {:ok, term()} | {:error, term()}
```

Advances the Fake test clock by a readable, keyword, or integer duration.

If `subject` carries a `processor_id` or `stripe_id`, the subscription-aware
Fake clock API is used so trial and renewal lifecycle effects can fire.

---

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