Category : Files from Magazines
Archive   : PCTJ0287.ZIP
Filename : DELAY.C

 
Output of file : DELAY.C contained in archive : PCTJ0287.ZIP
/*
* delay -- provide a delay of ** approximately ** the
* specified duration (resolution is about 0.055 second)
*/
#include "timer.h"

void
delay(d)
float d; /* duration in seconds and fractional seconds */
{
long ticks, then;
extern long getticks();

/* convert duration to number of PC clock ticks */
ticks = d * TICKRATE;
/* delay for the specified interval */
then = getticks() + ticks;
while (1)
if (getticks() > then)
break;
}


  3 Responses to “Category : Files from Magazines
Archive   : PCTJ0287.ZIP
Filename : DELAY.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/