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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -