# epochsToHours

> **epochsToHours**(`epochs`): `bigint`

Defined in: [packages/synapse-core/src/utils/epoch.ts:81](https://github.com/FilOzone/synapse-sdk/blob/8736322ef69c7a6b0f16402937c72a79b17d03e8/packages/synapse-core/src/utils/epoch.ts#L81)

Convert a number of epochs to whole hours (floor division).

Each Filecoin epoch is 30 seconds, so 120 epochs = 1 hour.

Passes `maxUint256` through unchanged so callers can use it as an
"infinite" sentinel (e.g. `resolveAccountState().runwayInEpochs` when
`lockupRate` is 0n).

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `epochs` | `bigint` | The number of epochs to convert |

## Returns

`bigint`

The number of whole hours

## Example

```ts
import { epochsToHours } from '@filoz/synapse-core/utils'

epochsToHours(240n)   // 2n
epochsToHours(2880n)  // 24n
```