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 |
- 4 comments
- 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
- Reply
- #4
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.
- Reply
- #3
funkydude Nov 09, 2014 at 19:31 UTC - 0 likesWhy 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.
- Reply
- #2
transitbus Nov 09, 2014 at 18:58 UTC - 0 likesThen 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.
- Reply
- #1
funkydude Nov 09, 2014 at 07:15 UTC - 0 likesThis is already provided in the tooltip.