PCAP\_GET\_TSTAMP\_PRECISION(3PCAP) PCAP\_GET\_TSTAMP\_PRECISION(3PCAP)

# [NAME](#NAME)

pcap\_get\_tstamp\_precision - get the time stamp precision returned in captures

# [SYNOPSIS](#SYNOPSIS)

```
#include <pcap/pcap.h>
```

```
int pcap_get_tstamp_precision(pcap_t *p);
```

# [DESCRIPTION](#DESCRIPTION)

**pcap\_get\_tstamp\_precision**() returns the precision of the time stamp returned in packet captures on the pcap descriptor.

# [RETURN VALUE](#RETURN_VALUE)

**pcap\_get\_tstamp\_precision**() returns **PCAP\_TSTAMP\_PRECISION\_MICRO** or **PCAP\_TSTAMP\_PRECISION\_NANO**, which indicates that pcap captures contains time stamps in microseconds or nanoseconds respectively.

# [BACKWARD COMPATIBILITY](#BACKWARD_COMPATIBILITY)

This function became available in libpcap release 1.5.1. In previous releases, time stamps from a capture device or savefile are always given in seconds and microseconds.

# [SEE ALSO](#SEE_ALSO)

[**pcap**(3PCAP)](/man/os/libpcap/pcap.3PCAP), [**pcap\_set\_tstamp\_precision**(3PCAP)](/man/os/libpcap/pcap_set_tstamp_precision.3PCAP), [**pcap-tstamp**(7)](/man/os/libpcap/pcap-tstamp.7)

23 August 2018

---

Document: pcap_get_tstamp_precision(3pcap) from libpcap 1.11.0-r0 (Chainguard OS)
Source: https://github.com/the-tcpdump-group/libpcap.git
