evaluate ( ( new File ( 'aFunction.groovy' ) ).text )
startTime = System.nanoTime ( )
def threads = [ ]
for ( i in 0 ..< repeatCount ) {
thread = new Thread ( aFunction )
threads << thread
thread.start ( )
}
for ( thread in threads ) { thread.join ( ) }
elapseTime = ( System.nanoTime ( ) - startTime ) / 1E9
println ( 'Elapse time = ' + elapseTime )