starlit  Diff

Differences From Artifact [6a568676fe]:

To Artifact [54a7601a0f]:


134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
}
-- function fn.vlerp

function fn.timespec(n)
	if n == 0 then return '0s' end
	if n < 0 then return '-' .. fn.timespec(n*-1) end

	local sec = n % 60
	local hr = math.floor(n / 60)
	local spec = {}

	if sec ~= 0 then table.insert(spec, string.format("%ss",  sec)) end
	if hr  ~= 0 then table.insert(spec, string.format("%shr", hr))  end
	return table.concat(spec, ' ')
end
return fn







|



|
|



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
}
-- function fn.vlerp

function fn.timespec(n)
	if n == 0 then return '0s' end
	if n < 0 then return '-' .. fn.timespec(n*-1) end

	local sec = math.floor(n % 60)
	local hr = math.floor(n / 60)
	local spec = {}

	if hr  ~= 0 then table.insert(spec, string.format("%shr", hr))  end
	if sec ~= 0 then table.insert(spec, string.format("%ss",  sec)) end
	return table.concat(spec, ' ')
end
return fn