Home>

Calculate the time it takes to execute the program:

void addinfo ()
{
 system.diagnostics.stopwatch sw=new system.diagnostics.stopwatch ();
 sw.start ();
 for (int i=0;i<1000;i ++)
 {
  console.writeline (i.tostring ());
  system.threading.thread.sleep (10);
 }
 sw.stop ();
 console.writeline ("time elapsed:{0}", sw.elapsed);
}
c
  • Previous Implement ios like function based on UIControl control
  • Next Android implements the method of storing files in SDCard