java / netbeans timer?
<p>I am working with stocks. I have an api (pre written), in which I have adjusted the code a bit to suit my requirements, such as getting tick feed to my requirement (one tick is minimum movement up or down +-.01 cent).</p>

<p>TICK is the way to describe a stock movement e.g. TICK charts etc. In very simple language it's just a movement/price change, nothing else. </p>

<p>The program prints out to the console when there has been three up ticks in a row or down ticks in a row.</p>

<p>I would like to know, how do I configure my api for a break out?  That means three ticks (price movement) or 4 ticks in a particular direction (last 4 prices of a stock were greater than the previous ones, e.g. $1.01 then $1.02 then $1.03 then 1.04) but all within a time frame, say 500 or 300 milliseconds.</p>

<p>Is there a timer function?
The api is written in net beans / java</p>
