ftime()

NAME

ftime() - get date and time

SYNOPSIS

#include <sys/timeb.h>

int ftime(struct timeb *tp)

DESCRIPTION

The ftime(3) call gets the current date and time and stores them in the time and millitm members of the timeb structure referenced by tp. The time is the time since 00:00:00 UTC, January 1, 1970. The time member contains seconds and the millitm member contains milliseconds.

This implementation also sets the timezone member to the time zone in minutes and the dstflag member to 1 if Daylight Savings Time can happen in the current time zone. However, this behavior is not supported on all systems.

Note that depending upon the granularity of the system clock is a non-portable coding practice.

RETURN VALUE

The ftime(3) utility exits with status 0 for success, and -1 if an error occurred.

SEE ALSO

ctime(3)

gettimeofday(3)

time(2)