changeset 467 | b5ec11e89768 |
parent 454 | edb4ad356c56 |
child 469 | 1f4e81950ab4 |
--- a/progs/re1.scala Mon Oct 24 14:46:47 2016 +0100 +++ b/progs/re1.scala Sat Oct 29 21:45:44 2016 +0100 @@ -62,9 +62,9 @@ val EVIL2 = SEQ(STAR(STAR(CHAR('a'))), CHAR('b')) //for measuring time -def time_needed[T](i: Int, code: => T) = { +def time_needed[T](i: Int, code => T) = { val start = System.nanoTime() - for (j <- 1 to i) code + for (j <- 1 to i) code() val end = System.nanoTime() (end - start)/(i * 1.0e9) }