---
title: "Discussion on \"ESP32 Standard Library Embedded Rust: Timers\" | Hashnode"
description: "Discussion on \"ESP32 Standard Library Embedded Rust: Timers\". This blog post is the fourth of a multi-part series of posts where I explore various peripherals in the ESP32C3 using standard library embedded Rust and the esp-idf-hal. Please be aware that certain c"
url: "https://hashnode.com/posts/esp32-standard-library-embedded-rust-timers/64cbb8ea099350c77ac6d8cd"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [ESP32 Standard Library Embedded Rust: Timers](https://blog.theembeddedrustacean.com/esp32-standard-library-embedded-rust-timers?utm_source=hashnode&utm_medium=feed)

This blog post is the fourth of a multi-part series of posts where I explore various peripherals in the ESP32C3 using standard library embedded Rust and the esp-idf-hal. Please be aware that certain c

Aug 3, 2023 · 13 min read · blog.theembeddedrustacean.com  
Updated Jul 1  
Read the article

-   [#rust](https://hashnode.com/tag/rust)
-   [#esp32](https://hashnode.com/tag/esp32)
-   [#embedded](https://hashnode.com/tag/embedded)
-   [#tutorial](https://hashnode.com/tag/tutorial)
-   [#beginner](https://hashnode.com/tag/beginner)

## Written by

[Omar Hiari](https://hashnode.com/@omarhiari)

@omarhiari

  
[View profile](https://hashnode.com/@omarhiari)

I am an 📟 Embedded Engineer with years of experience in both industry 🏭 and academia 🏫. Passionate Mentor 👨‍💼 and Instructor 👨‍🏫. Rustacean 🦀

## Responses 1

Markdown supported · ⌘↵ to post

[Christian Foucher](https://hashnode.com/@Valda60)

[Aug 11, 2023](https://hashnode.com/posts/esp32-standard-library-embedded-rust-timers/64cbb8ea099350c77ac6d8cd/comment/64d6348d764f843874c4564c)

Hello Omar,

I propose a refactoring in your github repository (see issue #2).

I admit that it was not straight forward to write the parameters of the function!

[Omar Hiari](https://hashnode.com/@omarhiari)

[Aug 13, 2023](https://hashnode.com/posts/esp32-standard-library-embedded-rust-timers/64cbb8ea099350c77ac6d8cd/comment/64d6348d764f843874c4564c#reply-64d86dc9102c3648a77c823c)

Thank you for your contribution [Christian Foucher](https://hashnode.com/@Valda60)! Actually, yes, given all the different types in embedded and the singleton pattern, setting up function parameters can take a while to digestive. This is why I try to avoid them in beginner tutorials. Maybe it's a topic for a separate blog post.

I revised your refactor and yes, I am printing the value regardless of the update. I will update the post and repo to incorporate this as an optimization.

[Christian Foucher](https://hashnode.com/@Valda60)

[Aug 14, 2023](https://hashnode.com/posts/esp32-standard-library-embedded-rust-timers/64cbb8ea099350c77ac6d8cd/comment/64d6348d764f843874c4564c#reply-64d9f2046203e95780d636e4)

[Omar Hiari](https://hashnode.com/@omarhiari) I have another suggestion. It concerns the displayed message. I have added a remark to the issue #2 on github repository (more clear than typing it here). It is about the decimal that can't be displayed because of the computation that gives an integer result. By the way, it permits to increase timer resolution in the displayed message.

[Omar Hiari](https://hashnode.com/@omarhiari)

[Aug 16, 2023](https://hashnode.com/posts/esp32-standard-library-embedded-rust-timers/64cbb8ea099350c77ac6d8cd/comment/64d6348d764f843874c4564c#reply-64dc89124429385b928035c5)

Thanks [Christian Foucher](https://hashnode.com/@Valda60), I will adjust this. It's an artifact left over as I was experimenting with floating point before. I decided to avoid floating point operations but forgot to adjust this.
