Akshit-Patel / frontend-101

Apache License 2.0
0 stars 0 forks source link

B2 review #12

Closed Akshit-Patel closed 5 years ago

Akshit-Patel commented 5 years ago

B2- Clock completed

kunal-mohta commented 5 years ago

Does this interval time need to be so less? Won't it work fine even if its 1000?

Akshit-Patel commented 5 years ago

It was done to keep accuracy. Example, if page loads at 3s 500ms then 1000ms will change degree of second hand at 4s 500ms but if time interval is small, let it be 1, then direction of second hand will change at 4s itself. Both will have this much difference ezgif com-video-to-gif

kunal-mohta commented 5 years ago

Okay! Just keep in mind that in many cases executing a piece of code repeatedly can take up too much processing power, which might affect other tasks happening on the website. For the clock purpose, this works perfectly.