---
name: "bson_get_monotonic_time"
section: "3"
platform: "linux"
package: "libbson-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/bson_get_monotonic_time"
---

# bson\_get\_monotonic\_time(3)

BSON Clock Abstraction

## SYNOPSIS

```
int64_t
bson_get_monotonic_time (void);
int
bson_gettimeofday (struct timeval *tv);
```

## DESCRIPTION

The clock abstraction in Libbson provides a cross-platform way to handle timeouts within the BSON library. It abstracts the differences in implementations of **gettimeofday()** as well as providing a monotonic (incrementing only) clock in microseconds.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
