xserver-multidpi/hw/xfree86/os-support/misc/Delay.c
Daniel Stone 292c4cff26 Fix includes right throughout the Xserver tree:
change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h;
change "foo.h", "extensions/foo.h" and "X11/foo.h" to
    <X11/extensions/foo.h> for extension headers, e.g. Xv.h;
change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.
2005-04-20 12:25:48 +00:00

41 lines
713 B
C

/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/Delay.c,v 3.3 2000/12/08 20:13:38 eich Exp $ */
#ifdef __UNIXOS2__
#define I_NEED_OS2_H
#endif
#include <X11/X.h>
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
#include <time.h>
void
xf86UDelay(long usec)
{
#if 0
struct timeval start, interrupt;
#else
int sigio;
sigio = xf86BlockSIGIO();
xf86usleep(usec);
xf86UnblockSIGIO(sigio);
#endif
#if 0
gettimeofday(&start,NULL);
do {
usleep(usec);
gettimeofday(&interrupt,NULL);
if ((usec = usec - (interrupt.tv_sec - start.tv_sec) * 1000000
- (interrupt.tv_usec - start.tv_usec)) < 0)
break;
start = interrupt;
} while (1);
#endif
}