javascript - Single timer or multiple timers in Node JS? -


hi there! developing auction in node js (express framework,socket.io). can advice me better way use single timer every product or multiple timers each product?

for example (code minimal):

once started...

for(active products) {     timer[timer_id] = setinterval(..        sec--;         ....     ) } 

or every second...

timer = setinterval(..    for(only active products)    {       sec--;    } ) 

both programming codes working now. want know way better or there other way it?

thanks in advance!


Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -