Algorithm for queue with multiple repeated different interval events
Use an efficient implementation of priority queues, such as binary heaps. Then, your algorithm would look like this:

proc triggerEvents(events : Array[(String, Integer)]) {
  q = new MinHeap()
  for ( i=0; i&lt;events.size; i++ ) {
    // use event index as key, interval as priority
    q.add(i, events[i][2])
  }

  while ( true ) {
    (i, p) = q.popMin()
    trigger(events[i][1])
    q.add(i, p + events[i][2])
  }
}


With $n$ the number of events, this will take time $\Theta(n \log n)$ for the initialisation¹ and then $O(\log n)$ time for each iteration of the while loop plus whatever trigger does.

In practice, be mindful of overflows.

You can not be asymoptotically faster than that; otherwise we could sort² in time $o(n \log n)$ which is not possible (for unrestricted inputs).




Can be sped up to $O(n)$; see e.g. here.
Add one event per element with its value as time interval. Drop the re-adding from the algorithm and execute $n$ iterations of the while-loop. Trigger just prints the element.