ftp://ftp.uni-heidelberg.de/pub/X11/contrib/applications/xscreensaver-1.25.tar.Z
[xscreensaver] / utils / usleep.c
old mode 100755 (executable)
new mode 100644 (file)
index ad0f4b6..2de351e
 #include <X11/Xlib.h>
 #include <X11/Xos.h>   /* lazy way out */
 
-#ifdef VMS
-#include <descrip.h>
-#include <stdio.h>
-extern char *progname;
-#include <lib$routines.h>
-unsigned long int statvms;
-float seconds;
-#endif
-
 /* usleep() doesn't exist everywhere, and select() is faster anyway.
  */
 
@@ -95,17 +86,12 @@ screenhack_usleep (usecs)
      unsigned long usecs;
 {
   int status, *bin_delta;
-
-/*  extern int SYS$SCHWDK (), SYS$HIBER ();                               */
-/*#define TICK_INTERVAL 1000                                              */
-/*                                                                        */
-/*  if (!deltas_set) set_deltas ();                                       */
-/*  bin_delta = (usecs == TICK_INTERVAL) ? &bin_tick_delta : &bin_sec_delta; */
-/*  status = SYS$SCHDWK (0, 0, bin_delta, 0);                             */
-/*  if ((status & 1)) (void) SYS$HIBER ();                                */
-
-      seconds = ((float) usecs)/1000000.0;
-      statvms = lib$wait(&seconds);
+  extern int SYS$SCHWDK (), SYS$HIBER (); 
+  
+  if (!deltas_set) set_deltas ();
+  bin_delta = (usecs == TICK_INTERVAL) ? &bin_tick_delta : &bin_sec_delta;
+  status = SYS$SCHDWK (0, 0, bin_delta, 0);
+  if ((status & 1)) (void) SYS$HIBER ();
 }
 
 #endif /*VMS */