# The bad boy Delay()

**URL:** <https://forum.arduino.cc/t/the-bad-boy-delay/1044015>\
**Category:** General Discussion\
**Created:** [October 20, 2022, 7:51am UTC](https://forum.arduino.cc/t/the-bad-boy-delay/1044015 "2022-10-20T07:51:00Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [October 20, 2022, 10:40am UTC](https://forum.arduino.cc/t/the-bad-boy-delay/1044015/23 "2022-10-20T10:40:13Z")

</div>

running this (fixing the for loop) on a UNO

```cpp
const int roll = 1000 ;

void setup() {
  Serial.begin(115200);
  uint32_t t1 = micros();
  for (int i = 0; i < roll ; i++) {
    asm(""); // do nothing
  }
  uint32_t t2 = micros();
  Serial.print(F("∆t = "));
  Serial.print(t2 - t1);
  Serial.println(F(" µs."));
}

void loop() {}

```

displays

```nohighlight
∆t = 316 µs.

```

---

_[View the full topic](https://forum.arduino.cc/t/the-bad-boy-delay/1044015)._
