Replaced Thread.sleep with timer, added performance test