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