# Editing decimal places in $t timer

**URL:** <https://discourse.psychopy.org/t/editing-decimal-places-in-t-timer/29591>\
**Category:** Coding\
**Created:** [June 14, 2022, 11:31am UTC](https://discourse.psychopy.org/t/editing-decimal-places-in-t-timer/29591 "2022-06-14T11:31:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ral](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/ral/32/8720_2.png) [@Ral](https://discourse.psychopy.org/u/Ral)\
**Post date:** [June 14, 2022, 11:31am UTC](https://discourse.psychopy.org/t/editing-decimal-places-in-t-timer/29591/1 "2022-06-14T11:31:41Z")

</div>

Hi all

I’m trying to give a visual clock on the screen so the participant knows how long they have left in a break between trials. I want to give them 30 seconds before the second half of the trials begin, and have this on screen for them so they know to be ready.

I found online you can use $t to display the length of the routine in real time, but this give a very long timer, to many decimal places.

Is there a way to reduce the visibility of the ms and just have SS:MS with $t, or do you have to code this differently?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Kimberley\_Dundas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/kimberley_dundas/32/32322_2.png) [@Kimberley\_Dundas](https://discourse.psychopy.org/u/Kimberley_Dundas)\
**Post date:** [June 15, 2022, 4:06pm UTC](https://discourse.psychopy.org/t/editing-decimal-places-in-t-timer/29591/2 "2022-06-15T16:06:00Z")

</div>

Hi @Ral,

For a seconds only timer:

`$round(t)`

For a seconds only countdown:

`$30 - round(t)`

You can also use `$round(t,2)` in the same ways as above to get 2 decimal places.

Hope this helps!

Kim
