#ifndef __DWC_TIMO_H
#define __DWC_TIMO_H

/*--------------------------------------------------------------------------
 *  Copyright (c) 2001-2004 Igor Daniloff. 
 *	All rights reserved.
 *
 * By using this file, you agree to the terms and conditions set
 * forth in the LICENSE file which can be found at this directory.
 *------------------------------------------------------------------------*/
 
/* $Id: dwc_timo.h,v 1.15 2005/09/21 09:20:44 asv Exp $ */

#if defined(__WIN32_DW)
#include <windows.h>

typedef DWORD            DWC_systimeout_t;
#endif /* WIN32 */

#if defined(__UNIX_DW)
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>

typedef struct timeval   DWC_systimeout_t;
#endif /* UNIX */
#include "dwc_type.h"

extern DWC_systimeout_t    start_timeout( DWC_timeout_t timo );
extern DWC_timeout_t       stop_timeout( DWC_timeout_t timo, DWC_systimeout_t start );
extern DWC_timeout_t       system_to_timeout( DWC_systimeout_t stimo );
extern DWC_systimeout_t*   timeout_to_system( DWC_timeout_t, DWC_systimeout_t* );
#if defined(__UNIX_DW)
extern DWC_timeout_t       timeval_to_timeout( struct timeval timev );
extern struct timeval*     timeout_to_timeval( DWC_timeout_t, struct timeval* );
#endif /* UNIX */

#endif
