home *** CD-ROM | disk | FTP | other *** search
- /* sys/ftime.c (emx+gcc) -- Copyright (c) 1992-1993 by Eberhard Mattes */
-
- #include <sys/emx.h>
- #include <os2emx.h>
- #include <sys/timeb.h>
- #include <time.h>
- #include "syscalls.h"
-
- void __ftime (struct timeb *ptr)
- {
- DATETIME now;
- struct tm tm;
-
- DosGetDateTime (&now);
- tm.tm_sec = now.seconds;
- tm.tm_min = now.minutes;
- tm.tm_hour = now.hours;
- tm.tm_mday = now.day;
- tm.tm_mon = now.month - 1;
- tm.tm_year = now.year - 1900;
- ptr->time = (time_t)_mktime (&tm);
- ptr->millitm = now.hundredths * 10;
- ptr->timezone = now.timezone;
- ptr->dstflag = 0;
- }
-