private void UpdateRecordingTime() { var ts = VideoCapture1.Duration_Time(); if (Math.Abs(ts.TotalMilliseconds) < 0.01) { return; } Dispatcher.BeginInvoke((Action)(() => { lbTimestamp.Text = "Recording time: " + ts.ToString(@"hh\:mm\:ss"); })); }
private void UpdateRecordingTime() { long timestamp = VideoCapture1.Duration_Time(); if (timestamp < 0) { return; } Dispatcher.BeginInvoke((Action)(() => { TimeSpan ts = TimeSpan.FromMilliseconds(timestamp); lbTimestamp.Text = "Recording time: " + ts.ToString(@"hh\:mm\:ss"); })); }