---
name: "vfs_timestamp"
section: "9"
platform: "linux"
package: "freebsd-manpages"
version: "6.0-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/vfs_timestamp"
---

# vfs\_timestamp(9)

generate current timestamp

## NAME

**vfs\_timestamp** – generate current timestamp

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/vnode.h\>**

*void*\

**vfs\_timestamp**(*struct timespec \*tsp*);

## DESCRIPTION

The **vfs\_timestamp**() function fills in *tsp* with the current time.

The precision is based on the value of the *vfs.timestamp\_precision* sysctl variable:

- 0

  seconds only; nanoseconds are zeroed.

- 1

  seconds and nanoseconds, accurate within 1/HZ.

- 2

  seconds and nanoseconds, truncated to microseconds.

- ≥3

  seconds and nanoseconds, maximum precision.

## AUTHORS

This manual page was written by Chad David ⟨davidc@acns.ab.ca⟩.
