Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!bbn!jr@bbn.com From: jr@bbn.com (John Robinson) Newsgroups: comp.emacs Subject: Re: sleep-for milli-seconds Message-ID: <54666@bbn.COM> Date: 9 Apr 90 20:29:08 GMT References: <9004091446.AA02335@life.ai.mit.edu> Sender: news@bbn.COM Reply-To: jr@bbn.com (John Robinson) Organization: BBN Systems and Technologies Corporation, Cambridge MA Lines: 30 In-reply-to: CLAASSEN@HNYKUN53.BITNET In article <9004091446.AA02335@life.ai.mit.edu>, CLAASSEN@HNYKUN53 writes: >Does anybody know of a way to make GNU sleep for milli-seconds instead >of seconds. (Our OS is ULTRIX) There is one for the Sun, in sunfns.c: /* * Sun sleep-for (allows a shorter interval than the regular sleep-for) */ DEFUN ("sleep-for-millisecs", Fsleep_for_millisecs, Ssleep_for_millisecs, 1, 1, 0, "Pause, without updating display, for ARG milliseconds.") (n) Lisp_Object n; { unsigned useconds; CHECK_NUMBER (n, 0); useconds = XINT(n) * 1000; usleep(useconds); return(Qt); } This depends on the system call usleep(), which sleeps for a specified number of microseconds. Given the appropriate system call, you could put this functionality into emacs under Ultrix (addf it to the source). -- /jr, nee John Robinson Life did not take over the globe by combat, jr@bbn.com or bbn!jr but by networking -- Lynn Margulis