transmitting time - Unix

This is a discussion on transmitting time - Unix ; Hi, Suppose I have a package from computer A which is sent to computer B. How can I know the time for this transmitting? One way is that before sending it, I gave a time stamp in the package and ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: transmitting time

  1. transmitting time

    Hi,

    Suppose I have a package from computer A which is sent to computer B.
    How can I know the time for this transmitting?

    One way is that before sending it, I gave a time stamp in the package
    and then send it to socket. When B receives it, it can check the current
    time and calculate the time it costs. But the problem is that the two
    computer are not precisely synchronized. So the result will not accurate.

    Do you have any suggestion?

    Best,
    Tony

  2. Re: transmitting time

    Tony, Zhang wrote:
    > Hi,
    >
    > Suppose I have a package from computer A which is sent to computer B.
    > How can I know the time for this transmitting?
    >
    > One way is that before sending it, I gave a time stamp in the package
    > and then send it to socket. When B receives it, it can check the current
    > time and calculate the time it costs. But the problem is that the two
    > computer are not precisely synchronized. So the result will not accurate.
    >
    > Do you have any suggestion?
    >

    Synchronise them - apropos ntp.

    --
    Ian Collins.

  3. Re: transmitting time

    On Apr 10, 2:54 am, "Tony, Zhang" wrote:
    > Hi,
    >
    > Suppose I have a package from computer A which is sent to computer B.
    > How can I know the time for this transmitting?
    >
    > One way is that before sending it, I gave a time stamp in the package
    > and then send it to socket. When B receives it, it can check the current
    > time and calculate the time it costs. But the problem is that the two
    > computer are not precisely synchronized. So the result will not accurate.
    >
    > Do you have any suggestion?


    It depends upon your precise requirements. If you really only need to
    measure round-trip-time, then you can take both time stamps on the
    same machine. If you really do need to measure uni-directional delay,
    but both machines are on reasonably symmetric net connections
    reasonably far away, synchronizing both machines using ntp may do.

    In the most extreme cases, you need to provide both ends with GPS time
    references. They cost on the order of $100 these days. Any GPS device
    that can provide a 'pulse per second' output synchronized to the UTC
    second boundary will do. Last I checked (four years ago or so), the
    Motorola Oncore series, though not cheap, was about the best GPS clock
    under $500.

    I would urge caution regarding using any time source other than GPS.

    DS

+ Reply to Thread