Efficient Stopwatch
问题 Hi I'm programming a stopwatch utility in javascript and I have a question about efficiency and overhead. There are two ways I have considered making the stopwatch: 1.Store a start Date and constantly measure the number of milliseconds it has been since that date. 2.Create an integer and increment its value at a set interval. I want to know which is most efficient. Also, I'm not sure if option #2 would be very accurate, if anyone has any input about this that would be awesome as well. 回答1: As