Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - ticks() delay execution for specified number of clock ticks http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ticks()             Delay execution for specified number of clock ticks
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   proc ticks extern
   param value uint uTicks

 Arguments
   uTicks is the number of clock ticks to wait for.

 Return
   None.

 Description
   The ticks() function generates a delay which can be defined as
   multiples of the internal system timer which is independent from the
   CPU speed.

   There are 18.2 timer ticks every second. The procedure cannot be
   interrupted by keystrokes.

 Example
   #define EXAMPLE_SYSTEM
   #include example.hdr

   proc Test_ticks
   vardef
      uint n
   enddef
   clear
   ?? "Counting from 2 to 10 with some delay..."
   for n := 2 to 10
      @ n, 10 ?? n
      ticks( 20 )
      @ n, 10 ?? space( 20 )
   next
   endproc

   proc main
   Test_ticks()
   endproc

See Also: delay() waitms()

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