www.delorie.com/djgpp/doc/libc-2.01/libc_352.html   search  
Go to the first, previous, next, last section, table of contents.


gettimeofday

Syntax

#include <sys/time.h>

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

Description

Gets the current GMT time and the local timezone information. The return structures are as follows:

struct timeval {
  long tv_sec;  /* seconds since 00:00:00 GMT 1/1/1970 */
  long tv_usec; /* microseconds */
};
struct timezone {
  int tz_minuteswest; /* west of GMT */
  int tz_dsttime;     /* set if daylight saving time in affect */
};

If either tp or tzp are NULL, that information is not provided.

See section settimeofday.

Return Value

Zero on success, nonzero on failure.


Go to the first, previous, next, last section, table of contents.

  prev next   webmaster     delorie software   privacy  
  Copyright © 1997     Updated Apr 1997