progs/bf/bfc1.sc
changeset 825 fb9f63a22114
parent 746 1779f8488689
child 990 8cb2e171d952
equal deleted inserted replaced
824:fb5462a350b1 825:fb9f63a22114
    73   for (i <- 0 until n) code
    73   for (i <- 0 until n) code
    74   val end = System.nanoTime()
    74   val end = System.nanoTime()
    75   (end - start)/(n * 1.0e9)
    75   (end - start)/(n * 1.0e9)
    76 }
    76 }
    77 
    77 
    78 @doc(" the argument should be a BF program ")
    78 //@doc(" the argument should be a BF program ")
    79 @main
    79 @main
    80 def main(fname: String) = {
    80 def main(fname: String) = {
    81   val bf_str = os.read(os.pwd / fname)
    81   val bf_str = os.read(os.pwd / fname)
    82   println(s"${time_needed(1, compile_and_run(bf_str))} secs")
    82   println(s"${time_needed(1, compile_and_run(bf_str))} secs")
    83 }  
    83 }