scala獲取程序運行時間

def timer[A](blockOfCode:=>A)={ val starttime=System.nanoTime //系統納米時間 val result=blockOfCode val endtime=System.nanoTime val delta=stoptime-starttime (result,delta/1000000d) } scala
相關文章
相關標籤/搜索