Author Topic: TNManager.ping Accuracy  (Read 4870 times)

devomage

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 67
  • Posts: 250
    • View Profile
TNManager.ping Accuracy
« on: January 25, 2015, 04:55:39 PM »
is there a way to make TNManager.ping more accurate?  it seems less likely that the ping integer is always multiples of 10 when polling at 0.75s intervals.

it is "ok" but it'd be nice to have a more accurate number to work with...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TNManager.ping Accuracy
« Reply #1 on: January 25, 2015, 08:45:09 PM »
That ping depends on the framerate. If you have 60 FPS, the minimum ping is going to be 1000/60 = 16.7 ms, since packets are processed in the Update() and responses won't be processed until the following update. Not sure what you mean by "polling at 0.75s intervals". Pings are checked every couple of seconds. Spamming ping requests isn't a good idea, especially considering that if you have a server in north america and a player in Australia, you can expect pings that are higher than 750 ms.