# `DripDrop.Clock`
[🔗](https://github.com/agoodway/dripdrop/blob/v0.1.0/lib/dripdrop/clock.ex#L1)

Centralized UTC clock helpers.

Production code uses these instead of `DateTime.utc_now/1` directly so the
second-precision policy and any future test-time clock freezing live in
one place. The clock is swappable via `config :dripdrop, :clock, MyClock`
where `MyClock` implements the `c:now/0` callback — useful for freezing
time in flaky timezone or DST tests.

All helpers truncate to the second by design. Sub-second precision is not
used in DripDrop schemas and would only invite drift between code paths.

# `now`

```elixir
@callback now() :: DateTime.t()
```

# `now`

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

Returns the current UTC time truncated to the second.

# `seconds_from_now`

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

Returns `now() + seconds`. Pass a negative value for a past timestamp.

Replaces the recurring `DateTime.utc_now(:second) |> DateTime.add(N, :second)`
pattern.

# `shift`

```elixir
@spec shift(DateTime.t(), integer()) :: DateTime.t()
```

Returns `datetime + seconds` truncated to the second.

---

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