# Problems with the millis() function

**URL:** <https://forum.arduino.cc/t/problems-with-the-millis-function/1320937>\
**Category:** Programming\
**Created:** [November 11, 2024, 5:35pm UTC](https://forum.arduino.cc/t/problems-with-the-millis-function/1320937 "2024-11-11T17:35:46Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![StefanL38](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stefanl38/32/713548_2.png) [@StefanL38](https://forum.arduino.cc/u/StefanL38)\
**Post date:** [November 15, 2024, 6:24pm UTC](https://forum.arduino.cc/t/problems-with-the-millis-function/1320937/27 "2024-11-15T18:24:59Z")

</div>

> [@andrzejn](#):
>
> I only have a problem with the use of millis(). And I asked for help in this regard , hoping to be shown and explained to me.

OK. There is a **fundamental difference** between using delay() and non-blocking timing.  
@the experienced users:

The thinking-wrong-about-it starts with writing too short

"use function millis()"

The first thought with this sentence is:

"OK I replace delay() with millis() and then I got it working."

As you experienced users **all** know. No this is much too less.

And this means a beginner that comes from delay() has to be told

## **EXPLICITLY**

non-blocking timing **BASED** on millis() works **fundamentally different**

Here is a tutorial that explains it

> [@Example-code for timing based on millis() easier to understand through the use of example-numbers / avoiding delay()](https://forum.arduino.cc/t/example-code-for-timing-based-on-millis-easier-to-understand-through-the-use-of-example-numbers-avoiding-delay/974017/1):
>
> non-blocking timing. Execute code only from time to time. There are a lot of different ways to learn programming. This thread wants to add another approach that is different to the yet existing ones. UPDATE 06.01.2023 if you are mainly interested in applying non-blocking timing you can do a quick read of this short tutorial / demonstration If you are intersted in understanding the details how it works go on reading here. I use an everyday analogon in this post to explain the basic principle …

---

_[View the full topic](https://forum.arduino.cc/t/problems-with-the-millis-function/1320937)._
