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 -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -