DEV Community

Discussion on: Simplify code by promisifying `setTimeout`

 
puruvj profile image
PuruVJ

Well, you have a point.

However having seconds measurement in a language that puts milliseconds as first class citizens would incur the cost of context switching.

Thanks for the info

Thread Thread
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

The context switching is precisely why I want this. If you're dealing with seconds in the backend but have to constantly switch to thinking in milliseconds for the frontend code, that's mental work I could spend thinking about the actual code.