# getsecstick

**URL:** <https://psychtoolbox.discourse.group/t/getsecstick/933>\
**Category:** Uncategorized\
**Created:** [May 26, 2003, 10:45pm UTC](https://psychtoolbox.discourse.group/t/getsecstick/933 "2003-05-26T22:45:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [May 26, 2003, 10:45pm UTC](https://psychtoolbox.discourse.group/t/getsecstick/933/1 "2003-05-26T22:45:56Z")

</div>

Hi,  
When I run getsecstick I get a value of 1e-9. This suggests to me that the   
getsecs clock is accurate to 1 nanosecond. But when I run getsecs, I get   
values out to 4 decimal places, suggesting that the clock is accurate to 100   
microseconds. What is the correct resolution of the clock? Is there any way to   
see the getsecs results out to 9 decimal places? thanks,  
  
jack

---

<div class="post-metadata">

**Author:** ![denispelli](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@denispelli](https://psychtoolbox.discourse.group/u/denispelli)\
**Post date:** [May 27, 2003, 3:48am UTC](https://psychtoolbox.discourse.group/t/getsecstick/933/2 "2003-05-27T03:48:51Z")

</div>

> \>Hi,  
> \>When I run getsecstick I get a value of 1e-9. This suggests to me that the  
> \>getsecs clock is accurate to 1 nanosecond. But when I run getsecs, I get  
> \>values out to 4 decimal places, suggesting that the clock is accurate to 100  
> \>microseconds. What is the correct resolution of the clock? Is   
> \>there any way to  
> \>see the getsecs results out to 9 decimal places? thanks,  
> \>  
> \>jack  
> \>

if you want MATLAB to print a number to more than four places, use a   
formatted print command, e.g.  
  
fprintf('%.9f s\n',getsecs);  
  
best  
  
denis
