I want to set a StopWatch
starting time from a specific time.
I calculate a TimeSpan.FromMilliseconds(frames*128)
(each frame shown every 128 milliseconds).
Than I proceed as follows:
var timeSpan = TimeSpan.FromMilliseconds(TimeFrame*128);
//e.g. 3762*128ms = 00h:08m:01s:5630ms
var offsetTimeSpan = new TimeSpan(0,0,timeSpan.Minutes,timeSpan.Seconds,timeSpan.Milliseconds).Add(_timeStopWatch.Elapsed);
_timeStopWatch.Start();
I used a methond specified by @Big T (link). However the StopWatch
seems to start from 00:00:00. How should it be done properly?