Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Sep 20 20:28:35 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 m8L3SZll002021 for ; Sat, 20 Sep 2008 20:28:35 -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 m8L3Ubnc020134 for ; Sat, 20 Sep 2008 20:30:37 -0700 Message-Id: <200809210330.m8L3Ubnc020134@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Interarrival time time Date: Sat, 20 Sep 2008 20:30:37 -0700 From: Bill Cheng Someone wrote: > Here's a case: > > The GetInterval function returns 2ms > And the processing time diff is 5 ms > > What should be done if processing time exceeds the interarrival time in arrival thread? > Should the sleep time be considered 0 and interarrival time = processing time? The sleep time should be zero (i.e., you should not sleep). The inter-arrival time should be whatever you measured. -- Bill Cheng // bill.cheng@usc.edu