Stopwatch get a more accurate running time

Source: Internet
Author: User

In the past, we often saw a bunch of people discussing a method better, saving time.
Later, someone suggested that the time precision obtained by using datetime. Now is not enough.

Msdn
See
There is
Stopwatch Method

In a typical stopwatch solution, call the start method, call the stop method, and use the elapsed attribute to check the running time.
By default, the running time value of the stopwatch instance is equivalent to the sum of all measured intervals. The cumulative running time count starts when start is called each time. The current interval measurement ends when stop is called each time, and the cumulative running time value is frozen. You can use the reset method to clear the accumulated running time of an existing stopwatch instance.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.