Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_sleep() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_SLEEP()

 DESCRIPTION

 C_SLEEP() pauses the current program for a specified period of
 time.  The delay is CPU independent so one second is the same
 regardless of the hardware.  This is useful to delay a process,
 such as moving objects on the screen, when timing is important and
 the hardware speed varies.  The C_SLEEP() function provides
 precision to 1/18 of a second.

 SYNTAX

 C_SLEEP(delay)

 PARAMETERS

 delay (N) is the amount of time, 1 through 18 (1 = 1/18 of a second,
 18 = 1 second), to pause the program.

 RETURNS

 There is no return value.

 EXAMPLES

 ? "Display Message"
 c_sleep(5)             && Display message for 5/18 of a second
 clear

 for i = 1 to 79        && Move an object across the screen
   ...
   movescrn()
   c_sleep(2)           && Delay each move 2/18 of a second
   ...                  && to keep move smooth
 next


See Also: C_KEYCODE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson