Public/Renderer/Set-ASRFrameTiming.ps1

function Set-ASRFrameTiming
{
    Param(
        [String]$Shell,
        [ValidateSet('0', '1', '2', '3', '4')]
        [Parameter()][int]$VSync,
        [ValidateSet('0', '30', '60', '120')]
        [Parameter()][int]$Frames
        )

        # first, get Shell we want to talk to
        $shellLocal = Get-ASDefaultShell
        if($PSBoundParameters['Shell']) {
            $shellLocal  = $Shell
        }
        if([System.String]::IsNullOrEmpty($shellLocal)) {
            Write-Host 'Target shell is not set. Please specify target shell with -Shell parameter or by Set-ASDefaultShellTarget snippet.'
            return
        }

        $object = New-Object –TypeName PSObject
        foreach ($boundParam in $PSBoundParameters.GetEnumerator())
        {
            $object | Add-Member –MemberType NoteProperty –Name $boundParam.Key –Value $boundParam.Value
        }
        
        $body = $object | ConvertTo-Json -Depth 8
        $uri = "http://$($shellLocal):4444/api/renderer/SetFrameTimingOptions" 
        $result = Invoke-RestMethod -Uri $uri -Body $body -Method POST -ContentType 'application/json'
}