# Help with a timer

**URL:** https://forum.makecode.com/t/help-with-a-timer/40270
**Category:** Help
**Tags:** game
**Created:** [November 7, 2025, 5:30am UTC](https://forum.makecode.com/t/help-with-a-timer/40270 "2025-11-07T05:30:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![AgentBoom](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agentboom/32/16635_2.png) [@AgentBoom](https://forum.makecode.com/u/AgentBoom)
#### Post date: [November 7, 2025, 5:30am UTC](https://forum.makecode.com/t/help-with-a-timer/40270/1 "2025-11-07T05:30:37Z")

</div>

Hello everyone; I am trying to make a timer for a game, and I finally got it to be accurate using WoofWoof’s deltaTime extension (Thanks WoofWoof helped a lot!) but I don’t have any idea how to remove all of the 9s following the first three decimals. Can I get some help? Thanks in advance!

> **[Untitled](https://arcade.makecode.com/25047-36073-04847-16174)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Here’s the code I’m using:

---

<div class="post-metadata">

### Author: ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)
#### Post date: [November 7, 2025, 7:04pm UTC](https://forum.makecode.com/t/help-with-a-timer/40270/2 "2025-11-07T19:04:04Z")

</div>

First, not my extension. (@Kiwiphoenix364 I didn’t want to drag up your very old topic just to say this, but whatever you have in that “delta” block is frankly completely incorrect, though you were correct in that the normal sprite velocity corrects itself using delta time already.)

You can remove the 9s by rounding. The issue with rounding is that you would lose the extra 3 numbers after the decimal that you don’t want to get rid of. While there is an extension with a block like “Round () to () decimal places”, I really don’t like using an extension if I can easily do it myself. I also forget what that extension is.

What I did was simply store a variable that was the seconds x 1000, round that number, and then divide by 1000 before showing the number:

 ![Screenshot 2025-11-07 at 1.11.25 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/0/4/04a88d64b7a670710c8fa963c6c4a2ab72afb74f.png)  
:)

---

<div class="post-metadata">

### Author: ![AgentBoom](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agentboom/32/16635_2.png) [@AgentBoom](https://forum.makecode.com/u/AgentBoom)
#### Post date: [November 7, 2025, 7:27pm UTC](https://forum.makecode.com/t/help-with-a-timer/40270/3 "2025-11-07T19:27:12Z")

</div>

> [@WoofWoof](#):
>
> First, not my extension

Oh man I am so sorry about that I got mixed up, credit totally goes to Kiwipheonix364.  
Thanks a lot @WoofWoof! I didn’t have a clue that there was a rounding block in Makecode, so I guess I learned something new. Thanks again!
