Skip to content

Commit

Permalink
修一个TABLE.reverse用法错误
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed May 13, 2024
1 parent 3c0266e commit d3406c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Zframework/stringExtend.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ function STRING.time_short(t)
if t<1 then return math.floor(t*1000)..timeLetters[6] end -- 123 ms
if t<MINUTE then return math.floor(t)..timeLetters[5]..' '..math.floor((t%1)*1000)..timeLetters[6] end -- 12s 345ms

local timeUnits=TABLE.reverse({convertSecondsToUnits(t)})
local timeUnits={convertSecondsToUnits(t)}
TABLE.reverse(timeUnits)

-- floor seconds
timeUnits[#timeUnits]=floorint(timeUnits[#timeUnits])
Expand Down

0 comments on commit d3406c4

Please sign in to comment.