/programs/develop/libraries/menuetlibc/src/libc/dos/sys/Makefile |
---|
0,0 → 1,8 |
all: |
make -C timeb |
depend: |
make -C timeb depend |
clean: |
make -C timeb clean |
/programs/develop/libraries/menuetlibc/src/libc/dos/sys/timeb/Makefile |
---|
0,0 → 1,3 |
THIS_SRCS = ftime.c |
include $(MENUET_LIBC_TOPDIR)/Make.rules |
/programs/develop/libraries/menuetlibc/src/libc/dos/sys/timeb/ftime.c |
---|
0,0 → 1,21 |
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ |
#include <libc/stubs.h> |
#include <time.h> |
#include <sys/timeb.h> |
int |
ftime(struct timeb *tp) |
{ |
struct timeval tv; |
struct timezone tz; |
if (gettimeofday(&tv, &tz) < 0) |
return -1; |
tp->time = tv.tv_sec; |
tp->millitm = tv.tv_usec / 1000; |
tp->timezone = tz.tz_minuteswest; |
tp->dstflag = tz.tz_dsttime; |
return 0; |
} |