Get time difference

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sauron

    #1

    Get time difference

    Hiya

    Does anyone know how I would get the difference between 2 times in
    milliseconds? I am doing functions that may take less than a second, and I
    need to know how many milliseconds it took. Also, for the function that did
    take over a second, I need to format the time to take into account the
    milliseconds as well. For example: Function 1 = 0.5 Secs, Function 2 = 3.7
    Secs (The time is taken before and after the function call and I will
    calculate the time based on these 2 times)

    Thank you.

    Regards,
    Steve.


  • phoenix

    #2
    Re: Get time difference

    If you're looking for high performance timers, there is one included in the
    sample on the following page :
    http://msdn.microsoft.com/library/de...rp11152001.asp

    Yves

    "Sauron" <stevea@centuri on-ms.co.uk> schreef in bericht
    news:O883hSP4DH A.1636@TK2MSFTN GP12.phx.gbl...[color=blue]
    > Hiya
    >
    > Does anyone know how I would get the difference between 2 times in
    > milliseconds? I am doing functions that may take less than a second, and I
    > need to know how many milliseconds it took. Also, for the function that[/color]
    did[color=blue]
    > take over a second, I need to format the time to take into account the
    > milliseconds as well. For example: Function 1 = 0.5 Secs, Function 2 = 3.7
    > Secs (The time is taken before and after the function call and I will
    > calculate the time based on these 2 times)
    >
    > Thank you.
    >
    > Regards,
    > Steve.
    >
    >[/color]


    Comment

    • Steve

      #3
      Re: Get time difference

      Hi Phoenix

      Works a treat! Thank you :o)

      Regards,
      Steve

      "phoenix" <patient0@skyne tWORK.be> wrote in message
      news:OJ$MReQ4DH A.1868@TK2MSFTN GP10.phx.gbl...[color=blue]
      > If you're looking for high performance timers, there is one included in[/color]
      the[color=blue]
      > sample on the following page :
      >[/color]
      http://msdn.microsoft.com/library/de...rp11152001.asp[color=blue]
      >
      > Yves
      >
      > "Sauron" <stevea@centuri on-ms.co.uk> schreef in bericht
      > news:O883hSP4DH A.1636@TK2MSFTN GP12.phx.gbl...[color=green]
      > > Hiya
      > >
      > > Does anyone know how I would get the difference between 2 times in
      > > milliseconds? I am doing functions that may take less than a second, and[/color][/color]
      I[color=blue][color=green]
      > > need to know how many milliseconds it took. Also, for the function that[/color]
      > did[color=green]
      > > take over a second, I need to format the time to take into account the
      > > milliseconds as well. For example: Function 1 = 0.5 Secs, Function 2 =[/color][/color]
      3.7[color=blue][color=green]
      > > Secs (The time is taken before and after the function call and I will
      > > calculate the time based on these 2 times)
      > >
      > > Thank you.
      > >
      > > Regards,
      > > Steve.
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...