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

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

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -