获取函数VB的处理时间

时间:2018-12-10 16:13:24

标签: vb.net visual-studio-2017

我需要一种方法来从WebService(服务器端)获取完成功能或过程所花费的时间,是否有任何简单的方法来做到这一点?

我正在使用VB.net和Visual Studio 2017

1 个答案:

答案 0 :(得分:0)

soohoonigan说了什么

Private Function SomeFunction() As Boolean
    Dim stpw As Stopwatch = Stopwatch.StartNew 'start timing
    '
    '
    '
    '
    'and then
    stpw.Stop() 'stop timing
    '
    ' the stpw.Elapsed property is a timespan

    Return False
End Function