icinga-powershell-framework/lib/core/tools/ConvertFrom-TimeSpan.psm1
2019-10-30 17:53:57 +01:00

18 lines
323 B
PowerShell

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