Where should i start the timer? I want the viewer 1 to view the stream only between 6 and 7 O’clock and viewer 2 to view the stream only between 7 O’clock and 8 O’clock. What if viewer 1 connects at 6:15? That’s not a valid then. Starting the timer on ouboundStreamCreation event in this case won’t suffice. Can you suggest a better one?
The createTimer command takes seconds as a parameter. If the user logs in at 6:15 and you want to kill the stream at 7, you can simply create a timer for 45 min * 60 secs/min = 2700 seconds.
Someone wrote:
There will be a dedicated timer running for each viewer. Once the timer is started, it will keep running (whether the user is viewing the stream or not). That’s the required functionality. I want to ask how this is going to affect the performance of the system?
The timers use a very small amount of resources. Having a large number of timers will not drastically impact performance.