[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference decwet::nt-developers

Title:MS Windows NT Developers
Notice:See note 1222 for MS bug reporting info
Moderator:TARKIN::LINEIBER
Created:Mon Nov 11 1991
Last Modified:Tue Jun 03 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3247
Total number of notes:15633

3212.0. "Better accuraccy from GetLocalTime ??" by SWETSC::TORLIND_L () Tue Mar 25 1997 02:01

Hi,
I'm not a very experienced programmer so I hope I will be excused if this question seems stupid.

I'm developing a network application and in the data packets I'm putting a time stamp. But from some tests I have
made the best accuracy I can get from the GetLocalTime is 55ms I would like to have an accuracy of 1 ms.
Any suggestions of how to do that. I'm using Visual c++ and a Windows95 PC when I'm developing this one.

When doing a  simple ping I can see response times of 1-3 ms, what is ICMP echo using to get that accuracy.

Hoping for help.
Lars-Ake Torlind Stockholm Sweden.

T.RTitleUserPersonal
Name
DateLines
3212.1wrapped to <80 columnsTARKIN::LINBill LinTue Mar 25 1997 02:2722
                    <<< Note 3212.0 by SWETSC::TORLIND_L >>>
                   -< Better accuraccy from GetLocalTime ?? >-

    
    Hi,
    
    I'm not a very experienced programmer so I hope I will be excused if
    this question seems stupid.

    I'm developing a network application and in the data packets I'm
    putting a time stamp. But from some tests I have made the best accuracy
    I can get from the GetLocalTime is 55ms I would like to have an
    accuracy of 1 ms. Any suggestions of how to do that. I'm using Visual
    c++ and a Windows95 PC when I'm developing this one.

    When doing a  simple ping I can see response times of 1-3 ms, what is
    ICMP echo using to get that accuracy.

    Hoping for help.
    
    Lars-Ake Torlind Stockholm Sweden.
    
3212.2POLAR::MOKHTARTue Mar 25 1997 13:525
    
    look into the QueryPerformanceFrequency() and QueryPerformanceCounter()
    functions.  they may help.
    
    maged
3212.3I'll try itSWETSC::TORLIND_LTue Mar 25 1997 15:486
    
    Hi,
    Thank's for the response. I'll try it.
    
    Lars-Ake T.