Friday, June 14, 2013

Simple Performance Benchmarking

int delayMillis = 100

Long startMillis = Calendar.instance.time.time

Thread.sleep(delayMillis)

Long passedMillis = Calendar.instance.time.time - startMillis

println passedMillis

assert passedMillis >= delayMillis

No comments:

Post a Comment