# zx::duration

## Summary

| ### Constructors and Destructors ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1af2599a9426f7f8ac0117b27556088086()` ||
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1ac6894928c0ad910ad609f84e01da3d5c(zx_duration_t value)` ||
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a5d922fa0f4a42e61d43715cb8ec2bf95(std::timespec ts)` ||

| ### Public functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1ad71e91b4fef3bfd2b09bb5fc9b86a6ae() const ` | `constexpr zx_duration_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a4f92f954a90895b6c7247c70076f70e0(https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration other) const ` | `constexpr bool` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1ac7858521c28a2ef130b9a236cf31cd9e(int64_t divisor) const ` | `constexpr https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1ad35e70b3eeded1c7f4f6a1a44b0030d5(https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration other) const ` | `constexpr int64_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a61e8ec7c0df431e9b97fc336b2362344(int64_t divisor)` | `constexpr https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration &` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a2daf164783343c8cead29f82d2458d29(int64_t multiplier)` | `constexpr https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a87e2d8ebc114f737082c19d5f40b55e0(int64_t multiplier)` | `constexpr https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration &` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a9af2d26ba30ceea53da93c8307684a97(https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration other)` | `constexpr https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a04600241af7d0269ad1c1dbced4475bf(https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration other)` | `constexpr https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration &` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1adaad8bc7016404a0be8947ab9fb72ebf()` | `constexpr https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a63312e919e22f77303984fa5f2c936c2(https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration other)` | `constexpr https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a9ea973d5e814caaeef9cd6c7057e1f16(https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration other)` | `constexpr https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration &` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a05c31f0fbe7480fe5b59e18b5dfd131d(int64_t divisor) const ` | `constexpr https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1abec2b308c01c87739f68b55cd20599de(https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration other) const ` | `constexpr int64_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1acc2f605b1240d09fd04f5d62f262146c(int64_t divisor)` | `constexpr https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration &` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1ad5d5940787fab874d4d5ed41fa2df3e4(https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration other) const ` | `constexpr bool` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a4d8184986855c1bd5714284a11457a88(https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration other) const ` | `constexpr bool` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a9a44916abd445b3b2d725dc8bfab25eb(https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration other) const ` | `constexpr bool` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a3f226552fcdabb3211fb89e092355e8d(https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration other) const ` | `constexpr bool` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1aa47c4234a2050ab480581471a5c6f015(https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration other) const ` | `constexpr bool` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a61b205b91cdae7a18557d064ef4b4ab2() const ` | `constexpr int64_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a824e973b878835d328b3266c202f20ac() const ` | `constexpr int64_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1acc966554f0b5e3dd70257c142ca0eab4() const ` | `constexpr int64_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a035b18490b78486485cafa94639f3ede() const ` | `constexpr int64_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a96b6977a9f6ee8ef1803841bf09eae80() const ` | `constexpr int64_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a49d33071998ddd881d17de0071bab539() const ` | `constexpr std::timespec` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a1ebf1376700f440d6406768e42975f57() const ` | `constexpr int64_t` |

| ### Public static functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1af37e198b4f1e779161f0a4f74f0d222b()` | `constexpr https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration` |
| `https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration_1a8eaa3f375385b5bdbc6b8f1fe409ce7f()` | `constexpr https://fuchsia.dev/reference/cpp/class/zx/duration#classzx_1_1duration` |

## Public functions

### duration

```c++
constexpr duration()=default
```

### duration

```c++
constexpr duration(
  zx_duration_t value
)
```

### duration

```c++
constexpr duration(
  std::timespec ts
)
```

### get

```c++
constexpr zx_duration_t get() const 
```

### operator!=

```c++
constexpr bool operator!=(
  duration other
) const 
```

### operator%

```c++
constexpr duration operator%(
  int64_t divisor
) const 
```

### operator%

```c++
constexpr int64_t operator%(
  duration other
) const 
```

### operator%=

```c++
constexpr duration & operator%=(
  int64_t divisor
)
```

### operator\*

```c++
constexpr duration operator*(
  int64_t multiplier
)
```

### operator\*=

```c++
constexpr duration & operator*=(
  int64_t multiplier
)
```

### operator+

```c++
constexpr duration operator+(
  duration other
)
```

### operator+=

```c++
constexpr duration & operator+=(
  duration other
)
```

### operator-

```c++
constexpr duration operator-()
```

### operator-

```c++
constexpr duration operator-(
  duration other
)
```

### operator-=

```c++
constexpr duration & operator-=(
  duration other
)
```

### operator/

```c++
constexpr duration operator/(
  int64_t divisor
) const 
```

### operator/

```c++
constexpr int64_t operator/(
  duration other
) const 
```

### operator/=

```c++
constexpr duration & operator/=(
  int64_t divisor
)
```

### operator\<

```c++
constexpr bool operator<(
  duration other
) const 
```

### operator\<=

```c++
constexpr bool operator<=(
  duration other
) const 
```

### operator==

```c++
constexpr bool operator==(
  duration other
) const 
```

### operator\>

```c++
constexpr bool operator>(
  duration other
) const 
```

### operator\>=

```c++
constexpr bool operator>=(
  duration other
) const 
```

### to_hours

```c++
constexpr int64_t to_hours() const 
```

### to_mins

```c++
constexpr int64_t to_mins() const 
```

### to_msecs

```c++
constexpr int64_t to_msecs() const 
```

### to_nsecs

```c++
constexpr int64_t to_nsecs() const 
```

### to_secs

```c++
constexpr int64_t to_secs() const 
```

### to_timespec

```c++
constexpr std::timespec to_timespec() const 
```

### to_usecs

```c++
constexpr int64_t to_usecs() const 
```

## Public static functions

### infinite

```c++
constexpr duration infinite()
```

### infinite_past

```c++
constexpr duration infinite_past()
```