c#实时获取回调函数的调用间隔
static Stopwatch sw = new Stopwatch();
static void Main(string[] args)
{
sw.Start();
}
public static int recvFrame_pCall()
{
if (sw.IsRunning)
{
sw.Stop();
Console.WriteLine("执行此段代码耗时:{0} ms", sw.ElapsedMilliseconds);
sw.Restart();
}
}