Welcome!

This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

Millis vs Delay

By
Guest
on 10/2/20, 7:23 AM 24 views

Hi, I have seen that depending on the program, there are times where it is used the millis function while in others the delay one is chosen.  What is the difference between both, and which one is the best?

Maria


0
Industrial Shields Forum user

Guillem Cura Marti

--Guillem Cura Marti--

1000000005
| 0 0 0
Sant Fruitós de Bages, España
--Guillem Cura Marti--
Guillem Cura Marti
On 10/2/20, 11:03 AM

Hi Maria,

The principal difference between the two functions is that the Delay() one is a blocking function. It means that if you call it, the program will be stopped until it the delay action has finished. So, it is usually better to use the millis() function as the call is very similar and it does not block the entire program.

For more information about the theme, we have an specific blog where we explain in more depth both functions, their differences and how can they be implemented. You can check it on the following link.

Thanks for asking, we hope to have been helpful.


Keep Informed

About This Community

This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 10/2/20, 7:23 AM
Seen: 24 times
Last updated: 10/2/20, 11:03 AM