public void ExecuteRecorder(RecorderList data, int speedMultiplier) { TimeSpan previousTimeSpan = TimeSpan.Zero; foreach (KeyValuePair <TimeSpan, byte[]> item in data) { TimeSpan key = item.Key; if (previousTimeSpan != TimeSpan.Zero) { Thread.Sleep((int)((key - previousTimeSpan).TotalMilliseconds / speedMultiplier)); } WriteRawData(_cidIntr, (uint)item.Value.Length, item.Value); previousTimeSpan = key; } }
public void StartRecorder() { _macroBytes = new RecorderList(); _recordingStart = DateTime.Now; _isRecording = true; }