[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How To Temporarily Suspend Network Traffic



On Tue, 01 Feb 2011 09:16:16 -0500, Gregory Seidman wrote:

> Now, those are the actual commands to run from the shell. You aren't
> going to get microsecond granularity that way.

FYI,

$ apt-cache show sleepenh
Package: sleepenh
Priority: extra
Section: universe/utils
Installed-Size: 60
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Original-Maintainer: Pedro Zorzenon Neto <pzn@debian.org>
Architecture: amd64
Version: 1.3-1
Depends: libc6 (>= 2.3.4)
Filename: pool/universe/s/sleepenh/sleepenh_1.3-1_amd64.deb
Size: 7526
MD5sum: 31d12f1bae42bd568535114ed397c4e5
SHA1: fa3a1f38fa7a3e456b4190dc6bbb4aa5b3bafae4
SHA256: 4105c3ef7dcf7014efb625d72dca95993d1a856d081e417bd379a0b66122fbff
Description: Sleep until a given date with subsecond resolution
 sleepenh is an sleep program for using in shell scripts
 that need to perform a loop that repeats at a regular
 time interval, without cumulative errors.
 .
 It supports microsecond resolution.
 .
 You can also specify the time you need between two calls
 of sleepenh.
 .
 Here follows an usage example to clarify its purpose. This
 example sends 'A' to ttyS0 every 1.2 seconds.
   #!/bin/sh
   # does not wait (or wait 0), just to get initial timestamp
   TIMESTAMP=`sleepenh 0`
   while true; do
     # send the byte to ttyS0
     echo -n "A" > /dev/ttyS0;
     # wait until the required time
     TIMESTAMP=`sleepenh $TIMESTAMP 1.200`;
   done
 .
 For more details, please read the manpage.

-- 
Tong (remove underscore(s) to reply)
  http://xpt.sourceforge.net/techdocs/
  http://xpt.sourceforge.net/tools/


Reply to: