s/pthread_mutex_t/mono_mutex_t in some header files too
[mono.git] / mono / io-layer / misc.c
1 #include <config.h>
2 #include <glib.h>
3 #include <sys/time.h>
4 #include <stdlib.h>
5
6 #include "misc-private.h"
7
8 void _wapi_calc_timeout(struct timespec *timeout, guint32 ms)
9 {
10         struct timeval now;
11         div_t divvy;
12                 
13         divvy=div((int)ms, 1000);
14         gettimeofday(&now, NULL);
15                 
16         timeout->tv_sec=now.tv_sec+divvy.quot;
17         timeout->tv_nsec=(now.tv_usec+divvy.rem)*1000;
18 }