gettimeofday()

get date and time 

Function


SYNOPSIS

#include <sys/time.h>

int gettimeofday(struct timeval *tp, void *tzp);


DESCRIPTION

The gettimeofday() function gets the current time, expressed as seconds and microseconds since 00:00 Coordinated Universal Time (UTC), January 1, 1970, and stores it in tp.


PARAMETERS

tp 

Points to a timeval structure that is to hold the current time.

tzp 

Is unused, and should be null.


RETURN VALUES

On success, gettimeofday() returns 0. On error, it returns -1 and sets errno to one of the following:

EFAULT 

tp is an invalid pointer.


CONFORMANCE

UNIX 98.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
ctime(), ftime()


PTC MKS Toolkit 10.3 Documentation Build 39.