![]() |
|||||
|
00001 /* ///////////////////////////////////////////////////////////////////////////// 00002 * File: time.h (sys/time.h) 00003 * 00004 * Purpose: Declaration of the gettimeofday() API function and supporting 00005 * types for the Win32 platform. 00006 * 00007 * Created: 8th December 2002 00008 * Updated: 13th August 2006 00009 * 00010 * Home: http://synesis.com.au/software/ 00011 * 00012 * Copyright (c) 2002-2006, Matthew Wilson and Synesis Software 00013 * All rights reserved. 00014 * 00015 * Redistribution and use in source and binary forms, with or without 00016 * modification, are permitted provided that the following conditions are met: 00017 * 00018 * - Redistributions of source code must retain the above copyright notice, this 00019 * list of conditions and the following disclaimer. 00020 * - Redistributions in binary form must reproduce the above copyright notice, 00021 * this list of conditions and the following disclaimer in the documentation 00022 * and/or other materials provided with the distribution. 00023 * - Neither the names of Matthew Wilson and Synesis Software nor the names of 00024 * any contributors may be used to endorse or promote products derived from 00025 * this software without specific prior written permission. 00026 * 00027 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00028 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00029 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00030 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00031 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00032 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00033 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00034 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00035 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00036 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00037 * POSSIBILITY OF SUCH DAMAGE. 00038 * 00039 * ////////////////////////////////////////////////////////////////////////// */ 00040 00041 00047 #ifndef SYNSOFT_UNIXEM_INCL_SYS_H_TIME 00048 #define SYNSOFT_UNIXEM_INCL_SYS_H_TIME 00049 00050 #ifndef UNIXEM_DOCUMENTATION_SKIP_SECTION 00051 # define SYNSOFT_UNIXEM_VER_SYS_H_TIME_MAJOR 2 00052 # define SYNSOFT_UNIXEM_VER_SYS_H_TIME_MINOR 0 00053 # define SYNSOFT_UNIXEM_VER_SYS_H_TIME_REVISION 3 00054 # define SYNSOFT_UNIXEM_VER_SYS_H_TIME_EDIT 15 00055 #endif /* !UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00056 00057 #include <stddef.h> 00058 /* #include <windows.h> */ 00059 00060 /* ////////////////////////////////////////////////////////////////////////// */ 00061 00072 /* ////////////////////////////////////////////////////////////////////////// */ 00073 00074 #ifdef __cplusplus 00075 extern "C" 00076 { 00077 #endif /* __cplusplus */ 00078 00085 #if !defined(_WINSOCKAPI_) && \ 00086 !defined(_WINSOCK2API_) && \ 00087 !defined(_WINSOCK2_H) && \ 00088 !defined(_TIMEVAL_DEFINED) 00089 00090 /* 00091 ( !defined(__GNUC__) || \ 00092 !defined(_TIMEVAL_DEFINED)) 00093 */ 00094 00095 struct timeval 00096 { 00097 long tv_sec; 00098 long tv_usec; 00099 }; 00100 00101 # if !defined(_TIMEVAL_DEFINED) 00102 # define _TIMEVAL_DEFINED 00103 # endif /* __GNUC__ */ 00104 00105 #endif /* _WINSOCKAPI_ / _TIMEVAL_DEFINED */ 00106 00112 struct timezone 00113 { 00114 int tz_minuteswest; 00115 int tz_dsttime; 00116 }; 00117 00125 extern void gettimeofday(struct timeval *tv, struct timezone *tz); 00126 00127 #ifdef __cplusplus 00128 } /* extern "C" */ 00129 #endif /* __cplusplus */ 00130 00131 /* ////////////////////////////////////////////////////////////////////////// */ 00132 00135 /* ////////////////////////////////////////////////////////////////////////// */ 00136 00137 #endif /* SYNSOFT_UNIXEM_INCL_SYS_H_TIME */ 00138 00139 /* ////////////////////////////////////////////////////////////////////////// */
|
UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2002-2005 |