Back to index

glibc  2.9
Functions
time.c File Reference
#include <stddef.h>
#include <time.h>
#include <sys/time.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

time_t time (time_t *t)

Function Documentation

time_t time ( time_t t)

Definition at line 27 of file time.c.

{
  struct timeval tv;
  time_t result;

  if (__gettimeofday (&tv, (struct timezone *) NULL))
    result = (time_t) -1;
  else
    result = (time_t) tv.tv_sec;

  if (t != NULL)
    *t = result;
  return result;
}