summaryrefslogtreecommitdiff
path: root/uisimulator/usleep.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-03-26 13:39:53 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-03-26 13:39:53 +0000
commit50e23294586bfa8d54aa0f51227a1afac783d8b6 (patch)
tree223971dee5dd8aaea2e5a5fd1925dc85e870fa24 /uisimulator/usleep.c
parenta0b47e16eb443603e2a40fb7ba463f58ef10a18e (diff)
downloadrockbox-50e23294586bfa8d54aa0f51227a1afac783d8b6.tar.gz
rockbox-50e23294586bfa8d54aa0f51227a1afac783d8b6.zip
not used
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/usleep.c')
-rw-r--r--uisimulator/usleep.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/uisimulator/usleep.c b/uisimulator/usleep.c
deleted file mode 100644
index 706675910e..0000000000
--- a/uisimulator/usleep.c
+++ /dev/null
@@ -1,58 +0,0 @@
1/* xscreensaver, Copyright (c) 1992, 1996, 1997
2 * Jamie Zawinski <jwz@jwz.org>
3 *
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation. No representations are made about the suitability of this
9 * software for any purpose. It is provided "as is" without express or
10 * implied warranty.
11 */
12
13#ifdef HAVE_CONFIG_H
14# include "config.h"
15#else /* !HAVE_CONFIG_H */
16# ifndef NO_SELECT
17# define HAVE_SELECT
18# endif
19#endif /* !HAVE_CONFIG_H */
20
21#ifdef __STDC__
22# include <stdlib.h>
23#endif
24
25#if defined(VMS)
26# include <descrip.h>
27# include <stdio.h>
28# include <lib$routines.h>
29#elif defined(HAVE_SELECT)
30# include <sys/time.h> /* for struct timeval */
31#endif
32
33
34#ifdef __SCREENHACK_USLEEP_H__
35ERROR, do not include that here
36#endif
37
38void
39screenhack_usleep (unsigned long usecs)
40{
41# if defined(VMS)
42 float seconds = ((float) usecs)/1000000.0;
43 unsigned long int statvms = lib$wait(&seconds);
44
45#elif defined(HAVE_SELECT)
46 /* usleep() doesn't exist everywhere, and select() is faster anyway. */
47 struct timeval tv;
48 tv.tv_sec = usecs / 1000000L;
49 tv.tv_usec = usecs % 1000000L;
50 (void) select (0, 0, 0, 0, &tv);
51
52#else /* !VMS && !HAVE_SELECT */
53 /* If you don't have select() or usleep(), I guess you lose...
54 Maybe you have napms() instead? Let me know. */
55 usleep (usecs);
56
57#endif /* !VMS && !HAVE_SELECT */
58}