---
title: 'Arduino protothreads without library'
url: 'https://www.duckd.cz/en/home/arduino-protothreads-without-library'
markdown: 'https://www.duckd.cz/en/home/arduino-protothreads-without-library.md'
lang: en
date: '2026-09-17'
description: 'Arduino Prtotothreads without protothread library Code: unsigned long timestamp = 0; int interval = 1000; // =1s void loop() { if(millis() - timestamp > (unsigned long)interval) { timestamp = millis(); //doSomething(); } }'
taxonomy:
  category:
    - arduino
  tag:
    - protothreads
    - scheduling
    - multitasking
  author:
    - josef-kubat
---

Documentation

# Arduino protothreads without library

 [› Obsah stránky](#content) [› Zpět](https://www.duckd.cz/en) [› Nahoru](#top) 

## Arduino Prtotothreads without protothread library

# Code:

```ino
 unsigned long timestamp = 0;
 int interval = 1000; // =1s

 void loop()
 {
   if(millis() - timestamp > (unsigned long)interval) {
     timestamp = millis();
     //doSomething();
   }  
 }
```

© www.duckd.cz

`Grav + Twig` • `atedo-quark` • `2026-09-18`

---

## Navigation

- Parent: [Home](https://www.duckd.cz/en/index.md)
- Previous: [Přehled ESP32: Wi-Fi generace, Wi-Fi standardy a Bluetooth](https://www.duckd.cz/en/home/esp-specifikace.md)
- Next: [Čištění studně](https://www.duckd.cz/en/home/cisteni-studne.md)
