This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

What's the difference between os_itv_wait and os_dly_wait?

Hello
I'm a newer to RL-ARM and I found that there're two wait function os_itv_wait and os_dly_wait in RL-ARM. Who can tell me what's the difference between them? For example is it possible to replace os_dly_wait(20) by os_itv_set(20); os_itv_wait()? Thanks.

Parents
  • Thanks Mr Westermark and Mr Michael. I didn't think I expressed my question clearly. Here I'll give an example.
    There's a task named clock in the traffice example of RTL given by Keil. The code is as following

    void clock (void)  __task {
      os_itv_set (100);                    /* set wait interval:  1 second       */
      while (1) {                          /* clock is an endless loop           */
        if (++ctime.sec == 60) {           /* calculate the second               */
          ctime.sec = 0;
          if (++ctime.min == 60) {         /* calculate the minute               */
            ctime.min = 0;
            if (++ctime.hour == 24) {      /* calculate the hour                 */
              ctime.hour = 0;
            }
          }
        }
        if (display_time) {                /* if command_status == display_time  */
          os_evt_set (0x0001,t_command);   /* signal to task command time changed*/
        }
        os_itv_wait ();                    /* wait interval (already set to 1s ) */
      }
    }
    


    Is it possible to change the os_itv_wait to os_dly_wait(100)? Thanks.

Reply
  • Thanks Mr Westermark and Mr Michael. I didn't think I expressed my question clearly. Here I'll give an example.
    There's a task named clock in the traffice example of RTL given by Keil. The code is as following

    void clock (void)  __task {
      os_itv_set (100);                    /* set wait interval:  1 second       */
      while (1) {                          /* clock is an endless loop           */
        if (++ctime.sec == 60) {           /* calculate the second               */
          ctime.sec = 0;
          if (++ctime.min == 60) {         /* calculate the minute               */
            ctime.min = 0;
            if (++ctime.hour == 24) {      /* calculate the hour                 */
              ctime.hour = 0;
            }
          }
        }
        if (display_time) {                /* if command_status == display_time  */
          os_evt_set (0x0001,t_command);   /* signal to task command time changed*/
        }
        os_itv_wait ();                    /* wait interval (already set to 1s ) */
      }
    }
    


    Is it possible to change the os_itv_wait to os_dly_wait(100)? Thanks.

Children