[Facades] Remove duplicate System.IO.Compression
[mono-project.git] / mono / io-layer / timefuncs.c
blob0528ae6946df59b7bd1f55f2e07b5062d2f3d8aa
1 /*
2 * timefuncs.c: performance timer and other time functions
4 * Author:
5 * Dick Porter (dick@ximian.com)
7 * (C) 2002 Ximian, Inc.
8 */
10 #include <config.h>
11 #include <glib.h>
12 #include <sys/time.h>
13 #include <stdlib.h>
14 #include <stdio.h>
16 #include <mono/io-layer/wapi.h>
17 #include <mono/io-layer/timefuncs-private.h>
18 #include "mono/utils/mono-time.h"
20 #undef DEBUG
22 void _wapi_time_t_to_filetime (time_t timeval, WapiFileTime *filetime)
24 guint64 ticks;
26 ticks = ((guint64)timeval * 10000000) + 116444736000000000ULL;
27 filetime->dwLowDateTime = ticks & 0xFFFFFFFF;
28 filetime->dwHighDateTime = ticks >> 32;
31 void _wapi_guint64_to_filetime (guint64 ticks, WapiFileTime *filetime)
33 filetime->dwLowDateTime = ticks & 0xFFFFFFFF;
34 filetime->dwHighDateTime = ticks >> 32;