# TimeHelpers

## contract TimeHelpers

Source: [contracts/common/TimeHelpers.sol](https://github.com/aragon/aragonOS/blob/v4.4.0/contracts/common/TimeHelpers.sol)

## Index

* [getBlockNumber](#getblocknumber)
* [getBlockNumber64](#getblocknumber64)
* [getTimestamp](#gettimestamp)
* [getTimestamp64](#gettimestamp64)

## Reference

### Functions

#### **getBlockNumber** <a href="#getblocknumber" id="getblocknumber"></a>

` function`` `` `**`getBlockNumber`**`() internal view returns (uint256)`

***

Returns the current block number. Using a function rather than \`block.number\` allows us to easily mock the block number in tests.

Returns:

* uint256

#### **getBlockNumber64** <a href="#getblocknumber64" id="getblocknumber64"></a>

` function`` `` `**`getBlockNumber64`**`() internal view returns (uint64)`

***

Returns the current block number, converted to uint64. Using a function rather than \`block.number\` allows us to easily mock the block number in tests.

Returns:

* uint64

#### **getTimestamp** <a href="#gettimestamp" id="gettimestamp"></a>

` function`` `` `**`getTimestamp`**`() internal view returns (uint256)`

***

Returns the current timestamp. Using a function rather than \`block.timestamp\` allows us to easily mock it in tests.

Returns:

* uint256

#### **getTimestamp64** <a href="#gettimestamp64" id="gettimestamp64"></a>

` function`` `` `**`getTimestamp64`**`() internal view returns (uint64)`

***

Returns the current timestamp, converted to uint64. Using a function rather than \`block.timestamp\` allows us to easily mock it in tests.

Returns:

* uint64


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://legacy-docs.aragon.org/developers/tools/aragonos/smart-contract-references/common/timehelpers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
