Back to index

glibc  2.9
Functions
gettimeofday.c File Reference
#include <errno.h>
#include <stddef.h>
#include <sys/time.h>
#include <mach.h>

Go to the source code of this file.

Functions

int __gettimeofday (struct timeval *tv, struct timezone *tz)

Function Documentation

int __gettimeofday ( struct timeval tv,
struct timezone *  tz 
)

Definition at line 30 of file gettimeofday.c.

{
  kern_return_t err;

  if (tz != NULL)
    *tz = (struct timezone){0, 0}; /* XXX */

  if (err = __host_get_time (__mach_host_self (), (time_value_t *) tv))
    {
      errno = err;
      return -1;
    }
  return 0;
}

Here is the call graph for this function: