FreeBSD Manual Pages
NOW(3) libdill Library Functions NOW(3) NAME now - get current time SYNOPSIS #include <libdill.h> int64_t now(void); DESCRIPTION Returns current time, in milliseconds. The function is meant for creating deadlines. For example, a point of time one second from now can be expressed as now() + 1000. The following values have special meaning and cannot be returned by the function: o 0: Immediate deadline. o -1: Infinite deadline. RETURN VALUE Current time. ERRORS None. EXAMPLE int result = chrecv(ch, &val, sizeof(val), now() + 1000); if(result == -1 && errno == ETIMEDOUT) { printf("One second elapsed without receiving a message.\n"); } SEE ALSO msleep(3) libdill NOW(3)
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | EXAMPLE | SEE ALSO
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=now&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>