Delay method

Viewing 1 reply thread
  • Author
    Posts
    • #3984
      prasanna.shevare
      Participant

        Hi Pavan,
        delay_ms(5000) is a blocking function. In order to execute this code properly, you need to use a non-blocking function. I will upload the code here in a couple of hours.

      • #4124
        FransSacco
        Participant

          hello…What do you mean by efficient?A 1ms delay is 1ms.
          Any software delay is a blocking delay, i.e. the code blocks the CPU from executing any other instructions.
          If you want tighter code, you can use
          while (–wait);
          But that means that wait must be increased for the same time delay.

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.