StatBlock_Latency

1 - add home and world latency to broker label

What does the provided patch do? Adds home and world latency to the label

Please provide any additional information below.

Example output would be:

56 | 60 ms

local format = string.format
 local function func()
    CTimerAfter(10, func)
    local _, _, home, world = GetNetStats()
    local rate = format("%.0f | %.0f ", home, world)
    obj.text = rate..lbl
    obj.value = rate
end
User When Change
transitbus Nov 09, 2014 at 03:53 UTC Changed description:
  **56 | 60 ms**

  <<code lua>>
+ local format = string.format
+ <</code>>
+
+ <<code lua>>
   local function func()
      CTimerAfter(10, func)
      local _, _, home, world = GetNetStats()
transitbus Nov 09, 2014 at 03:46 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 4 comments
  • Avatar of transitbus transitbus Nov 10, 2014 at 15:59 UTC - 0 likes

    <<reply 2390004>>

    No problem then. I modified your code to suit my needs and it works great. Thanks for the original idea, it works great with the changes I made and does exactly what I need it to do.

  • Avatar of funkydude funkydude Nov 09, 2014 at 19:31 UTC - 0 likes

    Why would I add framerate display to an addon designed to display latency? So you can save 0.5KB of memory that Statblock_FPS would use? That's not a good enough excuse.

    Adding coloring to the text would break any custom coloring a user may want to use in their display addon, so that's not going to happen either.

    Having both might be a good idea, but what would represent which is which to the user? The only clean way that it could really be done is splitting it into 2 objects with separate prefixes.

  • Avatar of transitbus transitbus Nov 09, 2014 at 18:58 UTC - 0 likes

    Then how about home and world latency on the label and fps on the tooltip as that is not as frequent of a change as latency is? the tooltip doesn't even need to have a timer control as you would update on mouseover by default thus saving memory.

    I even modified your addon to be color coded based on the degree of latency or fps.

  • Avatar of funkydude funkydude Nov 09, 2014 at 07:15 UTC - 0 likes

    This is already provided in the tooltip.

  • 4 comments

Facts

Last updated
Nov 09, 2014
Reported
Nov 09, 2014
Status
New - Issue has not had initial review yet.
Type
Patch - Source code patch for review
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees