RE: [aus-dotnet] TotalMilliseconds


    [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
    • From: Coral Johnson
    • Subject: RE: [aus-dotnet] TotalMilliseconds
    • Date: Fri, 03 Dec 2004 16:55:15 +1100

    I was actually incorrect saying that Total Milliseconds is the problem.
    DateTime.Now is actually where the rounding occurs.
    
    -----Original Message-----
    From: dotnet-owner@xxxxxxxxxxx [mailto:dotnet-owner@xxxxxxxxxxx]On
    Behalf Of Sean Malloy
    Sent: Friday, 3 December 2004 3:59 PM
    To: 'dotnet@xxxxxxxxxxx'
    Subject: RE: [aus-dotnet] TotalMilliseconds
    
    
    DateTime start = DateTime.Now;
    
    ....
    
    DateTime stop = DateTime.Now;
    
    calculate the difference in ticks (1000 ticks == 1ms)
    
    alternatively you could use PInvoke and win32 calls to
    QueryPerformanceCounter and QueryPerformanceFrequency
    
    
    
    > -----Original Message-----
    > From: Coral Johnson [mailto:coral.johnson@xxxxxxxxxxxxxxxx]
    > Sent: Friday, 3 December 2004 16:50
    > To: Aus-Dotnet
    > Subject: [aus-dotnet] TotalMilliseconds
    >
    >
    > It would seem that TotalMilliseconds has an approximate
    > resolution of 10
    > milliseconds.  However we need to record times accurate to 1
    > millisecond.
    > What is the best way of accomplishing this?
    >
    > Regards
    > Coral Johnson
    > ___________________________________________
    >
    > NetLogica Pty Ltd
    > 107 Scott St Westcourt QLD 4870, Australia
    > Tel 07 4041 1431
    > Mobile 0412 706 675
    > Email coral.johnson@xxxxxxxxxxxxxxxx
    >
    > _________________
    > You are a part of the Australian "dotnet" mailing list.
    > To unsubscribe send "unsubscribe dotnet" or to re-subscribe
    > send "subscribe dotnet Your Name" in the body of the email
    > to: imailsrv@xxxxxxxxxxx
    > List managed by: http://www.stanski.com
    >
    _________________
    You are a part of the Australian "dotnet" mailing list.
    To unsubscribe send "unsubscribe dotnet" or to re-subscribe send "subscribe
    dotnet Your Name" in the body of the email to: imailsrv@xxxxxxxxxxx
    List managed by: http://www.stanski.com
    
    _________________
    You are a part of the Australian "dotnet" mailing list.
    To unsubscribe send "unsubscribe dotnet" or to re-subscribe send "subscribe dotnet Your Name" in the body of the email to: imailsrv@xxxxxxxxxxx
    List managed by: http://www.stanski.com
    
    



    (Click here for more information on the aus-dotnet mailling list)