Compare Page Revisions
« Older Revision - Back to Page History - Current Revision
private DateTime _startTime; private int _imax; // upper bound of the zero-based array being processed private void UpdateStatus(int i) { var qtyDone = i + 1; var qtyTotal = _imax + 1; var msElapsed = DateTime.Now.Subtract(_startTime).TotalMilliseconds; var unitTime = msElapsed / (double)qtyDone; var etc = DateTime.Now.AddMilliseconds(unitTime * qtyTotal); uxProcessingLabel.Text = qtyDone.ToString("#,##0") + " of " + qtyTotal.ToString("#,##0"); uxEtcLabel.Text = etc.ToString("MM/dd/yy h:mm:ss tt"); uxProcessingLabel.Refresh(); uxEtcLabel.Refresh(); }
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.