starlit  Diff

Differences From Artifact [2d47a7e2f1]:

To Artifact [557fe13815]:


   158    158   function fn.timespec(n)
   159    159   	if n == 0 then return '0s' end
   160    160   	if n < 0 then return '-' .. fn.timespec(n*-1) end
   161    161   
   162    162   	local sec = math.floor(n % 60)
   163    163   	local min = math.floor(n / 60)
   164    164   	local hr = math.floor(min / 60)
          165  +	min = min % 60
   165    166   	local spec = {}
   166    167   
   167    168   	if hr  ~= 0 then table.insert(spec, string.format("%shr", hr))  end
   168    169   	if min  ~= 0 then table.insert(spec, string.format("%sm", min))  end
   169    170   	if sec ~= 0 then table.insert(spec, string.format("%ss",  sec)) end
   170    171   	return table.concat(spec, ' ')
   171    172   end
   172    173   return fn