Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>time_set()</b> c_exam03 http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
TIME_SET()                                                          C_EXAM03
   Specifies the number of clock ticks before a timer event.

   Syntax
         TIME_SET(nWait,nRepeat)

   Arguments
         nWait       Sets how many clock ticks (18.2/second) to wait.
         nRepeat     Sets how often (in clock ticks) to repeat a timer event.

   Returns
         None

   Description
         Using the TIME_SET() function, you can specify the number of clock
         ticks (18.2 per second) before a timer event is issued. The event
         returned by the KEY_PRESS() function will have a scan code value of
         217 and the ASCII code value will be the BIOS time that you should
         have received the event.

         Once this function is called, any subsequent calls to KEY_PRESS()
         will exit with an event code of 16 at each point in time specified by
         TIME_SET().

   Examples

         Display a clock on the screen:

         TIME_SET(1,18.2)                  && Timer event every second
         DO WHILE forever
            m_event = KEY_PRESS()          && Wait for next event
            IF m_event = 16                && Timer event
               @ 0,70 SAY TIME()           && Display time
               LOOP
            ENDIF
            . . more event testing.
         ENDDO

See Also: RET_TIME() TIME_START() TIME_STOP()

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