File:  [PGP] / pgp / src / sleep.c
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:45:35 2018 UTC (8 years, 1 month ago) by root
Branches: phill, MAIN
CVS tags: pgp263i, HEAD
PGP 2.6.3i

/*************
* sleep.c -- provide unix style sleep function
*
*************/
#include <time.h>

int sleep(unsigned secs){
	long	start;
	long	check;
	long	finish;

	time(&start);
	finish = start + (long) secs;
#ifdef DEBUG
	printf ("sleep for %d secs, stop sleeping at %ld\n", secs, finish);
	time(&check);
	printf ("it is now %ld\n", check );
#endif
	for (;;) {
		time(&check);
		if (check > finish)
			break;
	}
	return (0);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.