]> Creatis software - bbtk.git/blob - packages/std/src/bbstdWait.xml
*** MAJOR CHANGE *** NOT WORKING YET !!!
[bbtk.git] / packages / std / src / bbstdWait.xml
1 <!--==========================================================================
2    STARTS THE DESCRIPTION OF THE BLACK BOX -->
3 <blackbox name="Wait">
4 <!--=======================================================================-->
5
6   <!--========================================================================
7     THE BOX DOCUMENTATION -->
8
9   <author>laurent.guigues@creatis.insa-lyon.fr</author>
10   <description>Waits a certain number of milliseconds</description>
11   <category></category>
12   <!--=====================================================================-->
13
14   <!--========================================================================
15     #include directives to be put in the .h generated
16     There must be one tag per file to include
17     Here we include the standard header iostream.h -->
18   <include><PRE>ctime</PRE></include>
19   <!--=====================================================================-->
20
21   <!--========================================================================
22     INPUTS/OUTPUTS DECLARATION -->
23   <input name="In" type="int" description="Number of milliseconds to wait"/>
24   <!--=====================================================================-->
25
26   <!--========================================================================
27     THE PROCESSING METHOD BODY : -->
28   <process>
29   <PRE>
30     clock_t endwait;
31     endwait = clock () + (bbGetInputIn() * CLOCKS_PER_SEC )/ 1000;
32     while (clock() < endwait) {}
33   </PRE>
34   </process>
35   <!--=====================================================================-->
36
37  
38   <defaultValues>
39   <PRE>
40     bbSetInputIn(1000);
41   </PRE>
42   </defaultValues>
43
44   <!--=====================================================================-->
45
46 <!--=======================================================================-->
47 <!-- END OF BLACK BOX DESCRIPTION -->
48 </blackbox>
49 <!--=======================================================================-->