progs/bf/bfc0.sc
changeset 825 dca072e2bb7d
parent 746 6916229b817b
equal deleted inserted replaced
824:284ac979f289 825:dca072e2bb7d
    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 }