Keysight Pathwave 89600 VSA .NET API
UpdateTimestamp Method
See Also 
Agilent.SA.Vsa.Interfaces Assembly > Agilent.SA.Vsa Namespace > Input Class : UpdateTimestamp Method


seconds
The number of GPS time seconds. This is the number of linear seconds since 1980-01-06 00:00:00Z (i.e. January 6, 1980 UTC) which is the definition of GPS time.
fractionalSeconds
The fractional number of seconds which is expressed as the number of attoseconds.

Glossary Item Box

Updates the timestamp value (as a GPS time) that VSA should use for the acquisition. This is used when the TimestampSource is set to TimestampSource.User. This must be called after the measurement is started. The timestamp to be provided must be the GPS time of the trigger (the assumption is that external trigger is likely being used). This is only supported when using a Measurement.IsContinuous value of false.

Syntax

Visual Basic (Declaration) 
Public Overridable Sub UpdateTimestamp( _
   ByVal seconds As UInteger, _
   ByVal fractionalSeconds As ULong _
) 
C# 
public virtual void UpdateTimestamp( 
   uint seconds,
   ulong fractionalSeconds
)
C++/CLI 
public:
virtual void UpdateTimestamp( 
   uint seconds,
   ulong fractionalSeconds
) 

Parameters

seconds
The number of GPS time seconds. This is the number of linear seconds since 1980-01-06 00:00:00Z (i.e. January 6, 1980 UTC) which is the definition of GPS time.
fractionalSeconds
The fractional number of seconds which is expressed as the number of attoseconds.

Remarks

Converting from UTC time to the number of GPS seconds since the start of the GPS time epoch can be done by subtracting the start of the GPS time epoch in UTC from the date time in UTC that you wish to convert and then accounting for leap seconds since the start of the GPS time epoch (because the .NET DateTime and DateTimeOffset don't take leap seconds into account when subtracting two UTC dates). For example: var now = DateTime.UtcNow; // Note: Use Ticks instead of TotalSeconds when differencing in order to avoid numeric // issues when separating into the seconds and fractional seconds parts. long ticks = now.Subtract(DateTime.Parse("1980-01-06Z").ToUniversalTime()).Ticks; uint seconds = Convert.ToUInt32(ticks / 10000000L); // 1E7 of 100ns ticks per second ulong fractionalSeconds = Convert.ToUInt64(ticks - seconds * 10000000L) * 100000000000UL; // 1E11 attoseconds per 100ns tick secs += 18; // To account for leap seconds since .net doesn't take that into account when differencing UTC date times.

Requirements

Target Platforms: Windows 11 Professional or Enterprise; Windows 10 Professional, Enterprise, or Education (64-bit)

Minimum Software Version Requirement: Keysight PathWave 89600 VSA Ver 28.40

See Also