Results 1 to 4 of 4

Thread: [RESOLVED] .NET timing

  1. #1

    Thread Starter
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Resolved [RESOLVED] .NET timing

    This is neither C# or VB.NET specific i am just looking for a nice class to time the execution of specific blocks of code. At the moment i am just using the System.Diagnostics.Stopwatch class and C# seems to be performing better by quite a bit

    Anyway is there maybe a better way? From what i have heard Stopwatch is perfectly fine but just wondering, any ideas are welcome

  2. #2

    Thread Starter
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: .NET timing

    Never mind apparently the Stopwatch is a hardware timer and it is as good as you can possibly get

  3. #3
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: .NET timing

    StopWatch was added in .Net 2.0 so you didn't have to use ugly Win32 api (QueryPerformanceTimer to be more specific) so it's good
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  4. #4

    Thread Starter
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: .NET timing

    Thanks for the clarification

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width