KXL_Timer
Author: kacchan

Prev Top Next

Name
KXL_Timer
Synopsis

    KXL_Timer -- The number of times of interruption for 1 second is specified.

Description

    void KXL_Timer(Uint16 count);

Arguments

count | The number of times of interruption for 1 second.

Return Value
Nothing.
Exsample

    #include <KXL.h>

    int main(void)
    {
      Uint16 count = 0;
      Uint8 buff[64];

      KXL_CreateWindow(100, 100, "kxl.org", 0);

      KXL_Timer(1); // 1 interruption per second

      while (count <= 10) {
        KXL_ClearFrameImm(0, 0, 100, 100);
        sprintf(buff, "%2d second", count ++);
        KXL_PutText(8, 50, buff);
        KXL_UpDateImm(0, 0, 100, 100);
        while (KXL_GetTimer() == False);
        KXL_ResetTimer();
      }
      KXL_DeleteWindow();
      return 0;
    }