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

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -