Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Sep 23 23:00:10 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m8O60AQL019268 for ; Tue, 23 Sep 2008 23:00:10 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m8O62vdA018073 for ; Tue, 23 Sep 2008 23:02:57 -0700 Message-Id: <200809240602.m8O62vdA018073@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs551 prob with select() Date: Tue, 23 Sep 2008 23:02:57 -0700 From: Bill Cheng Someone wrote: > Is there any reason for select() not working or sleeping for the specified > amount of time. I'm not sure what you meant by "not working". To me, not working means that if you try to sleep for X seconds, it returns without sleeping. Is that what's going on? > I tried replacing it with usleep() and it works fine. If it works for you, then feel free to use it. I thought the argument of usleep() is a 32-bit unsigned integer! So, the maximum you can specify is to sleep for 4294967295 microseconds and this is only 4,295 seconds. Our spec implies that you need to be able to sleep for at most 10,000 seconds. -- Bill Cheng // bill.cheng@usc.edu