source: trunk/src/emx/src/lib/time/settimeo.c@ 18

Last change on this file since 18 was 18, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 503 bytes
Line 
1/* settimeo.c (emx+gcc) -- Copyright (c) 1995-1996 by Eberhard Mattes */
2
3#include <time.h>
4#include <sys/time.h>
5#include <errno.h>
6#include <emx/time.h>
7#include <emx/syscalls.h>
8
9int _settimeofday (const struct timeval *tp, const struct timezone *tzp)
10{
11 struct timeval local;
12 time_t t;
13
14 if (tzp != NULL)
15 {
16 errno = EINVAL;
17 return -1;
18 }
19 if (!_tzset_flag) _tzset ();
20 t = tp->tv_sec;
21 local.tv_sec = _gmt2loc (&t);
22 local.tv_usec = tp->tv_usec;
23 return __settime (tp);
24}
Note: See TracBrowser for help on using the repository browser.