protected override void StopProcessing() { TotalTime.Stop(); WriteObject($"Process Interrupted - total time: {TotalTime.Elapsed.Seconds} seg"); base.StopProcessing(); }
protected override void EndProcessing() { TotalTime.Stop(); WriteObject($"Finished, total time: {TotalTime.Elapsed.Seconds} seg - Speed {Mean / (double)CObject.Files.Length} sec/picture"); base.EndProcessing(); }
private void MonoCefBrowser_Paint(object sender, OnPaintEventArgs e) { if (e.DirtyRect.Width == 0 || e.DirtyRect.Height == 0) { return; } TotalTime.Start(); var bmp = this.ScreenshotOrNull(PopupBlending.Main); Texture2D texture = null; if (bmp != null) { texture = GetTexture(bmp, e.DirtyRect); RenderCount++; //Console.WriteLine($"{TotalTime.ElapsedMilliseconds / (double)RenderCount}"); } TotalTime.Stop(); if (texture != null) { this.NewFrame?.Invoke(this, new NewFrameEventArgs(texture)); } }