Added function to convert seconds to runtime

This commit is contained in:
Lord Hepipud 2019-08-20 17:01:20 +02:00
parent 5791dbeddd
commit c6ae93cb7b

View file

@ -0,0 +1,18 @@
Import-IcingaLib core\tools;
function ConvertFrom-TimeSpan()
{
param(
$Seconds
);
$TimeSpan = [TimeSpan]::FromSeconds($Seconds);
return [string]::Format(
'Days: {0} Hours: {1} Minutes: {2} Seconds: {3}',
$TimeSpan.Days,
$TimeSpan.Hours,
$TimeSpan.Minutes,
$TimeSpan.Seconds
);
}