private void addStopwatchSplits ( Stopwatch stopwatch , int splitWidth ) { final int splits = randomInt ( splitWidth / 2 , splitWidth ) ; try { lock . lock ( ) ; System . out . print ( stopwatch . getName ( ) + " " + splits + ": " ) ; for ( int i = 0 ; i < splits ; i ++ ) { System . out . print ( addStopwatchSplit ( stopwatch ) + "," ) ; } System . out . println ( ) ; } finally { lock . unlock ( ) ; } }
Generate a Simon of type Stopwatch and fill it with some Splits .