sree032397
asked on
Progress Bar
I have written a code that takes 65 minutes to execute in my System for 30,000 Iterations. I want to add a dynamic Progress Bar For this code.
My code looks Like this
Public void method1()
{
for(int i=0;i<30000;i++)
{
//Do Somthing
}
MyClas obj = new MyClass()
obj.method2();
}
Public void method2()
{
for(int i=0;i<30000;i++)
{
//Do Somthing
}
}
Please let me know how to add a dynamic progress bar for this code??.(The Processing time is depending on the System resources)
My code looks Like this
Public void method1()
{
for(int i=0;i<30000;i++)
{
//Do Somthing
}
MyClas obj = new MyClass()
obj.method2();
}
Public void method2()
{
for(int i=0;i<30000;i++)
{
//Do Somthing
}
}
Please let me know how to add a dynamic progress bar for this code??.(The Processing time is depending on the System resources)
You will have to let it run for one second or so and see how long it took, and after that scale the progress bar.
*delete/ignore my answe pls*
At the end of each iteration, increments the width of the progress bar by (width_of_bar * i / 30000).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.