From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,5dfab989268cd339,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-07-02 08:59:40 PST Newsgroups: comp.sys.dec Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!noc.near.net!uunet!mcsun!dxcern!hpopc4!richards From: richards@hpopc4.cern.ch (Gareth Richards) Subject: VAX or DEC C and sleeping using select() Message-ID: Sender: news@dxcern.cern.ch (USENET News System) Organization: CERN European Lab for Particle Physics Date: Fri, 2 Jul 1993 15:42:13 GMT At the moment I am trying put in a delay into the event loop of some program to slow it down. I'm attempting to use the select() function to select an invalid socket and using the timeout for the delay. For example, struct timeval delay; delay.tv_sec = 0; delay.tv_usec = 200000; select(0,0,0,0,&delay); this snippet should delay the processor for 1/5 th of a second. BUT, it doesn't seems to work. Why???? Some background info: it works on a HP. Oddly, select() should be in time.h but is in fact in socket.h despite what the help says. I've compiled the code on an Alpha using the /stand=vaxc option. Any help would be much appreciated. Peter