1 /* 2 Copyright (C) 2003-2006 Borut Razem 3 4 This file is part of gpsim. 5 6 gpsim is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 gpsim is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with gpsim; see the file COPYING. If not, write to 18 the Free Software Foundation, 59 Temple Place - Suite 330, 19 Boston, MA 02111-1307, USA. */ 20 21 /* 22 Declarations, missing in MSVC header files, 23 normaly defined in <time.h> and <sys/time.h> 24 */ 25 26 #ifndef _UXTIME_H 27 #define _UXTIME_H 28 29 #include <time.h> 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 /* 36 * Structure returned by gettimeofday(2) system call 37 */ 38 39 #ifdef _MSC_VER 40 #ifndef _WINSOCKAPI_ 41 struct timeval { 42 unsigned long tv_sec; /* seconds */ 43 long tv_usec; /* and microseconds */ 44 }; 45 46 struct timezone { 47 int tz_minuteswest; 48 int tz_dsttime; 49 }; 50 #endif 51 52 int gettimeofday(struct timeval *tv, struct timezone *tz); 53 #endif 54 55 #ifndef _TIMESPEC_DEFINED 56 #define _TIMESPEC_DEFINED 57 58 struct timespec { 59 time_t tv_sec; /* Seconds */ 60 long tv_nsec; /* Nanoseconds */ 61 }; 62 63 #endif 64 65 int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); 66 67 #ifdef __cplusplus 68 } 69 #endif 70 71 #endif 72