Results 1 to 3 of 3

Thread: [RESOLVED] how to read System.Time, how accurate?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2006
    Location
    3rd rock from the sun
    Posts
    360

    Resolved [RESOLVED] how to read System.Time, how accurate?

    G'day all.

    how to determine execute time of a SQL query?

    sTime=read system time
    -> execute a NonQuery on a database
    eTime=read system time

    calculate the diff.. dTime=eTime-sTime..

    no go..
    Error: Value of type 'System.TimeSpan' cannot be converted to 'Date'.

    any ideas on how to get the diff???

    thanks,

  2. #2
    Registered User nmadd's Avatar
    Join Date
    Jun 2007
    Location
    U.S.A.
    Posts
    1,676

    Re: how to read System.Time, how accurate?

    You didn't say what version you are using, but if you are using the 2.0 Framework then you can use the Stopwatch class to accurately measure elapsed time:
    http://msdn2.microsoft.com/en-us/lib...ch(vs.80).aspx

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2006
    Location
    3rd rock from the sun
    Posts
    360

    Re: how to read System.Time, how accurate?

    Quote Originally Posted by nmadd
    You didn't say what version you are using, but if you are using the 2.0 Framework then you can use the Stopwatch class to accurately measure elapsed time:
    http://msdn2.microsoft.com/en-us/lib...ch(vs.80).aspx
    am using 2.0 Framework.
    and the suggested class is perfect!!

    many thanks @nmadd!!!!

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