---
name: "bson_iter_timestamp"
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_iter_timestamp"
---

# bson\_iter\_timestamp(3)

## SYNOPSIS

```
#define BSON_ITER_HOLDS_TIMESTAMP(iter) \
   (bson_iter_type ((iter)) == BSON_TYPE_TIMESTAMP)
void
bson_iter_timestamp (const bson_iter_t *iter,
                     uint32_t *timestamp,
                     uint32_t *increment);
```

## PARAMETERS

- •

  **iter**: A *bson\_iter\_t*.

- •

  **timestamp**: A uint32\_t.

- •

  **increment**: A uint32\_t.

## DESCRIPTION

The BSON\_TYPE\_TIMESTAMP type is not a date/time and is typically used for intra-server communication.

You probably want *bson\_iter\_date\_time()*.

The *bson\_iter\_timestamp()* function shall return the contents of a BSON\_TYPE\_TIMESTAMP element. It is invalid to call this function while observing an element that is not of type BSON\_TYPE\_TIMESTAMP.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
