Skip to content

Commit

Permalink
Add time domain GlobalTime to C#
Browse files Browse the repository at this point in the history
  • Loading branch information
doronhi committed May 6, 2019
1 parent 31a6f36 commit f98df08
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ public enum TimestampDomain

/// <summary> Frame timestamp was measured in relation to the OS system clock</summary>
SystemTime = 1,

GlobalTime = 2,
}
}
2 changes: 2 additions & 0 deletions wrappers/csharp/cs-tutorial-2-capture/Window.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<ColumnDefinition />
</Grid.ColumnDefinitions>

<TextBox x:Name="txtTimeStamp" Grid.Column="0" />

<Image x:Name="imgDepth" Grid.Column="0" />
<Image x:Name="imgColor" Grid.Column="1" />
</Grid>
Expand Down
5 changes: 5 additions & 0 deletions wrappers/csharp/cs-tutorial-2-capture/Window.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ public CaptureWindow()
// Render the frames.
Dispatcher.Invoke(DispatcherPriority.Render, updateDepth, colorizedDepth);
Dispatcher.Invoke(DispatcherPriority.Render, updateColor, colorFrame);

Dispatcher.Invoke(new Action(() =>
{
txtTimeStamp.Text = String.Format("{0,-20:0.00}", depthFrame.Timestamp) + "(" + depthFrame.TimestampDomain.ToString() + ")";
}));
}
}
}, tokenSource.Token);
Expand Down

0 comments on commit f98df08

Please sign in to comment.