# WaitSecs() windows XP problem

**URL:** <https://psychtoolbox.discourse.group/t/waitsecs-windows-xp-problem/1942>\
**Category:** Uncategorized\
**Created:** [July 18, 2005, 6:52pm UTC](https://psychtoolbox.discourse.group/t/waitsecs-windows-xp-problem/1942 "2005-07-18T18:52:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stojanoski\_b](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@stojanoski\_b](https://psychtoolbox.discourse.group/u/stojanoski_b)\
**Post date:** [July 18, 2005, 6:52pm UTC](https://psychtoolbox.discourse.group/t/waitsecs-windows-xp-problem/1942/1 "2005-07-18T18:52:26Z")

</div>

We are having a problem with the WaitSecs() function. we are using  
matlab 7 on a windows xp pro computer.  
  
we noticed that when we put a decimal number in that is less that 1  
second the waitSecs function returns imediatly.(i.e waitSecs(0.9)  
doesnt waait at all) but it works fine when its over 1 second.  
  
to test the problem i created a little test program:  
  
function test1  
  
a = clock;  
WaitSecs(0.9);  
clock - a  
  
and when I run the program on the old version of matlab(6.5) we get  
the following output  

> \>\> test1

ans =  
 0 0 0 0 0 0.9060  
  
but when we run the exact same code on matlab 7 we get   
ans =  
 0 0 0 0 0 0  
  
and there is no delay present.  
  
any idea what could be doing this?
