1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question Function to get latency?

Discussion in 'Developer Support' started by muttaclien, Aug 3, 2015.

  1. muttaclien

    Joined:
    Jul 18, 2015
    Messages:
    6
    Likes Received:
    0
    Hey, I see server latency is listed in the misc section of developer telemetry panel. Can't seem to find any such function in the runemate jar. Can anyone point me in the right direction? (Or alternatively, what's a convenient tool/plugin for searching jars for functions containing key phrases?)

    Thanks!
     
  2. PhaseCoder

    Joined:
    Jan 1, 2015
    Messages:
    272
    Likes Received:
    26
  3. muttaclien

    Joined:
    Jul 18, 2015
    Messages:
    6
    Likes Received:
    0
    No shit Mr. Sherlock. How do I spider this? Google doesn't have indexed very well.
     
  4. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,938
    Likes Received:
    1,266
  5. muttaclien

    Joined:
    Jul 18, 2015
    Messages:
    6
    Likes Received:
    0
    Hmm, guess I should have phrased more clearly - I'm looking for network latency not framerate latency. The misc section of developer panel shows both network latency and framerate(Ping: 315ms, FPS:50). Ended up just spidering the whole javadocs and grepping for anything containing "ping"|"latency", case insensitive. Nothing came up.
     
  6. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,938
    Likes Received:
    1,266
    Tagging @Cloud because I couldn't find it either.
     
  7. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    The reason that it's not currently in the API is because as far as I'm aware the rs client itself doesn't store it's ping. The ping that's displayed in the misc tab is calculated by us by measuring the amount of time it takes to connect to the world you're on. I could make an api method that would return a Future<Integer> for it that would calculate it (since we know the base server and such), but the problem is it would have to be recalculated a lot. You could cache it but ping changes a lot over a running session.
     
  8. Hazard

    Joined:
    Apr 18, 2015
    Messages:
    408
    Likes Received:
    84
    Partially related to this; is it somehow possible to detect the state of the client? For example delay while it's loading etc; the not-very-powerful other botclient has this at Game#clientState()
     
  9. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    That feature is very rarely useful for more than simply checking if logged in and is a HUGE pain in the ass to make give consistent values because they change the expected values for each state in each gamepack and it requires mapping them back to more usable states.
     

Share This Page

Loading...