Back to index

glibc  2.9
Functions
ftime.c File Reference
#include <errno.h>
#include <time.h>
#include <sys/timeb.h>

Go to the source code of this file.

Functions

int ftime (struct timeb *timebuf)

Function Documentation

int ftime ( struct timeb timebuf)

Definition at line 24 of file ftime.c.

{
  int save = errno;
  struct tm tp;

  __set_errno (0);
  if (time (&timebuf->time) == (time_t) -1 && errno != 0)
    return -1;
  timebuf->millitm = 0;

  if (__localtime_r (&timebuf->time, &tp) == NULL)
    return -1;

  timebuf->timezone = tp.tm_gmtoff / 60;
  timebuf->dstflag = tp.tm_isdst;

  __set_errno (save);
  return 0;
}

Here is the call graph for this function: