# Units

### Common units

* `wei` is the smallest subdenomination of Ether (1 `wei` == 1)
* `gwei` is the commonly used subdenomination to describe gas price (1 `gwei` == 1e9)
* `ether` unit (1 `ether` == 1e18)

#### Note

In Solidity, we will use integers for calculations and the language does not support the `float` type. The float representation issue causes rounding errors (`rounding`) that create logical holes for attack.

### Time units

* 1 == 1 `seconds`
* 1 `minutes` == 60 `seconds`
* 1 `hours` == 60 `minutes`
* 1 `days` == 24 `hours`
* 1 `weeks` == 7 `days`

**Example**

```solidity
function f(uint start, uint daysAfter) public {
    if (block.timestamp >= start + daysAfter * 1 days) {
        // ...
    }
}
```


---

# 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://bootcamp.openguild.wtf/smart-contract-development/advanced-solidity/units.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.
