Milliseconds in DateTime.Now on .NET Compact Framework always zero?

前端 未结 4 1984
情话喂你
情话喂你 2021-02-19 11:28

i want to have a time stamp for logs on a Windows Mobile project. The accuracy must be in the range a hundred milliseconds at least.

Ho

4条回答
  •  悲&欢浪女
    2021-02-19 12:03

    The main alternative is the System.Diagnostics.Stopwatch class.

    It is available in CE but note the IsHighResolution property. It probably is False on your device but do check.

    It is as accurate as you're going to get without P/Invoke.

提交回复
热议问题