/****************************************************************************
 *
 * $Source: /usr/local/cvsroot/gccsdk/unixlib/source/netlib/timeofday.c,v $
 * $Date: 2001/01/29 15:10:20 $
 * $Revision: 1.2 $
 * $State: Exp $
 * $Author: admin $
 *
 ***************************************************************************/

#ifdef EMBED_RCSID
static const char rcs_id[] = "$Id: timeofday.c,v 1.2 2001/01/29 15:10:20 admin Exp $";
#endif

#include <sys/time.h>
#include <time.h>

void
gettimeofday (struct timeval *tv, struct timezone *tz)
{
  time_t t;
  struct tm *tmptr;

  t = time (NULL);
  tmptr = localtime (&t);

  tv->tv_sec = tmptr->tm_sec + tmptr->tm_min * 60 + tmptr->tm_hour * 60 * 60;
  tv->tv_usec = 0;
}
