SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Location
    UK
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Propagation Delay Calculator??????????

    Hi, i want to create a very simple calculator to calculate the propagation delay of a network from the distance the signal has to travel. I also want to calculate the transmission time from the message size and data rate. Plus calculate the total delay by adding the progagation delay and the transmission time.

    I have no idea on how to do this using java script? Any idea's?

    Many thanks

  2. #2
    SitePoint Evangelist SpaceFrog's Avatar
    Join Date
    Jan 2005
    Location
    Outerspace
    Posts
    511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did not exactly grab what you wanted to do... but this may be of some help...

    Code:
    <script type='text/javascript'>
    var StartTime, StopTime
    function launchclock(){
    StartTime = new Date();
    }
    function howlongwuzzat(){
    StopTime = new Date();
    alert(StopTime - StartTime + ' millisecondes');
    }
    </script>
    initiate clock with launchclock()
    lauch action you want to test
    retrive time with howlongwuzzat()


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •