SAB139@psuvm.psu.edu
Date: 05/03/92


Date: Sunday, 3 May 1992 16:39:11 EDT
From: <SAB139@psuvm.psu.edu>
Subject: Re: usleep, where is it?

Alright thanks to obz@sisd.Kodak.COM (Orest Zborowski COMP) for the following
implementation of usleep. It works like a charm. Tetris for Terminals now can
join the list of successfully ported software.

>[obz@sisd.kodak.com]
>here is my implementation of usleep. you can post it if you like, as i can't!

>#include <sys/time.h>

>void
>usleep(unsigned long usec)
>{
> struct timeval timeout;

> timeout.tv_sec = usec / 1000000;
> timeout.tv_usec = usec - 1000000 * timeout.tv_sec;
> select(1, NULL, NULL, NULL, &timeout);
>}