程序運行時間查看

       Dim sw As Stopwatch = New Stopwatch
        sw.Start()
運行代碼
        sw.Stop()
        Dim ts As TimeSpan = sw.Elapsed '獲取總時間
        'ts2.TotalMilliseconds
        Dim strMessage as string =String.Format("運行時間爲:{0} 毫秒", ts.TotalMilliseconds)

如果這篇博客對您有所幫助的話,將是我的榮幸,如果能夠再點個讚的話,將是多麼美好的一件事。?

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章