diff options
| author | uema2 <uema2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-14 05:27:35 +0000 |
|---|---|---|
| committer | uema2 <uema2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-14 05:27:35 +0000 |
| commit | 41aa7849ad9efa0da495802e2b0a472a1402be09 (patch) | |
| tree | c26991efff67368cda5153751d797893b796fc80 /wince/sys/timeb.c | |
| parent | 65716b585693c5c6c4b536cb3c6cce4636017ef6 (diff) | |
| download | ruby-41aa7849ad9efa0da495802e2b0a472a1402be09.tar.gz ruby-41aa7849ad9efa0da495802e2b0a472a1402be09.tar.xz ruby-41aa7849ad9efa0da495802e2b0a472a1402be09.zip | |
* wince/sys : add stat.c, stat.h, timeb.c, timeb.h,
types.h, utime.c, utime.h
* wince/dll.mak : object file name changed.
* wince/io.c : add empty dup2().
* wince/io.h : add dup2 definition.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'wince/sys/timeb.c')
| -rw-r--r-- | wince/sys/timeb.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/wince/sys/timeb.c b/wince/sys/timeb.c new file mode 100644 index 000000000..838ae0798 --- /dev/null +++ b/wince/sys/timeb.c @@ -0,0 +1,25 @@ +/*************************************************************** + timeb.c +***************************************************************/ + +#include <windows.h> +#include <time.h> +#include <sys/timeb.h> + + +int ftime(struct timeb *tp) +{ + SYSTEMTIME s; + FILETIME f; + + GetLocalTime(&s); + SystemTimeToFileTime( &s, &f ); + + tp->dstflag = 0; + tp->timezone = _timezone/60; + tp->time = wce_FILETIME2time_t(&f); + tp->millitm = s.wMilliseconds; + + return 0; +} + |
