Skip to content

get_TimeBase

James Brundage edited this page Oct 23, 2026 · 1 revision

get_TimeBase

Gets the Wave Time Base

Gets the Wave Time Base.

This is the smallest amount of time that the wave records.

Notes

Since the sample rate is the number of samples per second,

This is the reciprocal of that value, expressed as a [TimeSpan]

View Source
<#
.SYNOPSIS
    Gets the Wave Time Base
.DESCRIPTION
    Gets the Wave Time Base.  
    
    This is the smallest amount of time that the wave records.
.NOTES
    Since the sample rate is the number of samples per second, 
    
    This is the reciprocal of that value, expressed as a `[TimeSpan]`
#>
param()

$sampleRate = $this.SampleRate

if (-not $sampleRate) { return [TimeSpan]::FromSeconds(0) }

if ($sampleRate) {
    [TimeSpan]::FromSeconds(
        (1 / $this.SampleRate)
    )
}

Clone this wiki locally