# nng_clock(3supp) Manual Page

## NAME

nng_clock - get time

## SYNOPSIS

    #include <nng/nng.h>

    typedef uint64_t nng_time;

    nng_time nng_clock(void);

## DESCRIPTION

The `nng_clock()` returns the number of elapsed milliseconds since some arbitrary time in the past. The resolution of the clock depends on the underlying timing facilities of the system. This function may be used for timing, but applications should not expect very fine-grained values.

| The reference time will be the same for a given program, but different programs may have different references.

| This function should help with setting appropriate timeouts.

## RETURN VALUES

Milliseconds since reference time.

## ERRORS

None.

## SEE ALSO

nng_sleep_aio(3), nng_strerror(3), nng_cv_until(3supp), nng_msleep(3supp), nng_duration(5), nng(7)