[message edit; let's move this to threads]
Well, like many of them pointed out, one is not likely to get anything down to ten millisecond interval on a reliable clock tick in Java without some adroit analysis of exactly what it is you want to do.
What you have posed is an inversive recursion, check the clock every ten milliseconds. Pat's reply is the most reliable, but without some concept from you, we will have a hornet's nest in about 12 milliseconds every ten millis seconds, will you be here to help us swat the hornets ?
I did not try to compile this code, you will have to provide us more detail, there are plenety of posters here who know the toolset in detail.
[ October 22, 2007: Message edited by: Nicholas Jordan ]