# `NebulaGraphEx.Types.Duration`
[🔗](https://github.com/VChain/nebula_graph_ex/blob/v0.1.10/lib/nebula_graph_ex/types/duration.ex#L1)

NebulaGraph duration value.

Durations are stored as a combination of months, seconds, and microseconds
because months cannot be represented as a fixed number of seconds (they vary
in length).

## Fields

* `:months` — total months component
* `:seconds` — seconds component (independent of months)
* `:microseconds` — sub-second component

# `t`

```elixir
@type t() :: %NebulaGraphEx.Types.Duration{
  microseconds: integer(),
  months: integer(),
  seconds: integer()
}
```

# `total_seconds`

```elixir
@spec total_seconds(t()) :: float()
```

Returns the total number of seconds in the non-month component.
Does not account for the `:months` field (months are calendar-dependent).

---

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