/* ******************************************************************************* * Copyright (c) 1996 Martin Poole * ******************************************************************************* ** ** WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! ** ** Any changes to be made to this file should first be checked with ** mplib1 source control for library integrity. ** ** mplib1 source control can be reached at mplib1@quatermass.co.uk ** * * $Source: /home/cvs/cvsroot/onelan/onelan/src/mplib1/libsrc/bpo_nap.c,v $ * $Author: mpoole $ * $Date: 2002/10/07 09:37:37 $ * $Revision: 1.2 $ * ******************************************************************************* * * Change History * * $Log: bpo_nap.c,v $ * Revision 1.2 2002/10/07 09:37:37 mpoole * Initial checkin of mplib1-3.1.0 * * Revision 1.1 2002/10/07 09:36:54 mpoole * Initial checkin of mplib1-3.1.0 * * ******************************************************************************* */ #ident "$Header: /home/cvs/cvsroot/onelan/onelan/src/mplib1/libsrc/bpo_nap.c,v 1.2 2002/10/07 09:37:37 mpoole Exp $" /* ------------------------------------------------------------------ Include files ------------------------------------------------------------------ */ #include #include #include #include #include #include #include /* ------------------------------------------------------------------ defines ------------------------------------------------------------------ */ #ifndef BPO_LOCK_NAP_USEC #define BPO_LOCK_NAP_USEC 5000 #endif /* ------------------------------------------------------------------ Code starts here ------------------------------------------------------------------ */ int bpo_nap_a_while( long secs, long usecs ) { struct timeval my_nap; my_nap.tv_sec = secs; my_nap.tv_usec = usecs; return (select( 0, NULL, NULL, NULL, &my_nap )); } int bpo_take_a_nap( void ) { return(bpo_nap_a_while( 0, BPO_LOCK_NAP_USEC )); } /* -- End of File -- */