summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-09-01 03:42:35 +0200
committerNiklas Haas <github-daiK1o@haasn.dev>2023-10-14 12:30:46 +0200
commite5446399e14656ab1fedebe88cad38d5078fe172 (patch)
treea7ae164d7c5a9659564ee08bafa949ad4e07ec57
parent31ba5cd6dfc4803a02908d35f464e2c1c0d14de9 (diff)
downloadmpv-e5446399e14656ab1fedebe88cad38d5078fe172.tar.bz2
mpv-e5446399e14656ab1fedebe88cad38d5078fe172.tar.xz
stats.lua: remove leading zeros from pass timings
Makes it more readable in my opinion.
-rw-r--r--player/lua/stats.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua
index 892b85a6f2..ef888115d2 100644
--- a/player/lua/stats.lua
+++ b/player/lua/stats.lua
@@ -317,7 +317,7 @@ local function append_perfdata(s, dedicated_page)
-- Pretty print measured time
local function pp(i)
-- rescale to microseconds for a saner display
- return format("%05d", i / 1000)
+ return format("%5d", i / 1000)
end
-- Format n/m with a font weight based on the ratio
@@ -328,7 +328,7 @@ local function append_perfdata(s, dedicated_page)
end
-- Calculate font weight. 100 is minimum, 400 is normal, 700 bold, 900 is max
local w = (700 * math.sqrt(i)) + 200
- return format("{\\b%d}%02d%%{\\b0}", w, i * 100)
+ return format("{\\b%d}%2d%%{\\b0}", w, i * 100)
end
-- ensure that the fixed title is one element and every scrollable line is