progs/bf/bfc0.sc
changeset 825 fb9f63a22114
parent 746 1779f8488689
child 990 8cb2e171d952
equal deleted inserted replaced
824:fb5462a350b1 825:fb9f63a22114
    61   for (i <- 0 until n) code
    61   for (i <- 0 until n) code
    62   val end = System.nanoTime()
    62   val end = System.nanoTime()
    63   (end - start)/(n * 1.0e9)
    63   (end - start)/(n * 1.0e9)
    64 }
    64 }
    65 
    65 
    66 @doc(" the argument should be a BF program ")
    66 //@doc(" the argument should be a BF program ")
    67 @main
    67 @main
    68 def main(fname: String) = {
    68 def main(fname: String) = {
    69   val bf_str = os.read(os.pwd / fname)
    69   val bf_str = os.read(os.pwd / fname)
    70   println(s"${time_needed(1, compile_and_run(bf_str))} secs")
    70   println(s"${time_needed(1, compile_and_run(bf_str))} secs")
    71 }  
    71 }