Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@sources.redhat.com Delivered-To: mailing list cygwin@sources.redhat.com Message-Id: <4.2.0.58.20001113011419.00aab7f0@joeclark.mail.iastate.edu> X-Sender: joeclark@joeclark.mail.iastate.edu (Unverified) X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Mon, 13 Nov 2000 01:18:31 -0600 To: cygwin@sourceware.cygnus.com From: Joe Clark Subject: clock() and sleep(int) system calls Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Hello there. I'm trying to build a socket-based program on WinNT 4, and I'd like to be able to combine clock() and sleep() in the program, but from my preliminary experiments, it appears that the sleep() function reinitializes the variable that clock() keeps track of -- so much for measuring elapsed time. Is this documented somewhere? Is there some good explanation for why it works this way? Is there a way around it? While I'm at it, for those who know socket programming, is there a way to "kill" a call to the accept(...) function, which normally blocks until a connection comes in? I'd like to declare a maximum time for my server to run (say 5 minutes), and then have it exit normally. Thanks for your help. - Joe Clark, Iowa State University -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com