Xref: utzoo comp.unix.microport:3096 comp.unix.xenix:5575 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!tut.cis.ohio-state.edu!ukma!rutgers!att!homxb!homxc!dwc From: dwc@homxc.ATT.COM (Malaclypse the Elder) Newsgroups: comp.unix.microport,comp.unix.xenix,comp.unix.i386 Subject: Re: nap in Sys V (millisecond sleeps) Keywords: XENIX SysV nap Message-ID: <6235@homxc.ATT.COM> Date: 7 Apr 89 00:47:14 GMT References: <661@micropen> <743@omen.UUCP> <663@micropen> <716@pcrat.UUCP> Organization: Legion of Dynamic Discord Lines: 15 another way to do this is to write a pseudo-device driver and use ioctl on that device to put an entry in the callout table to wake itself up in N ticks. then you can write a user level nap() to hide all the ugliness. or if you are uncomfortable with writing pseudo-device drivers, then just reserve a tty line, open it, ioctl it into raw mode and with a timeout value equivalent to the desired nap time and do a read from that line. again, once you know which tty line is reserved for this, you can hide all the ugliness in a function call. danny chen att!homxc!dwc