private void
Totla_ElapsedTime_Environment()//Calculate/Measure
Total Elapsed Time for a Process in C#.Net using Environment.TickCount
{
int initTime = Environment.TickCount;
System.Threading.Thread.Sleep(1000);
int ElapsedTime = Environment.TickCount
- initTime;
string S_ElapsedTime = string.Format("Total Elapsed Time: {0} in MilliSeconds",
ElapsedTime);
}
Note: Environment.TickCount will overflow after approximately 25 days, because the return value is a 32-bit integer
Note: Environment.TickCount will overflow after approximately 25 days, because the return value is a 32-bit integer