I know the answer to this might bd simple but nothing comes to my mind right now.
So what i have is a array with different items. The array consists of two elements. Index, time. I want to use the time and remove the items after that time has elasped(basically using a delay i guess.). But if i use a for each loop for this its gonna wait till the time for the first item has elasped and then move to the next one and then count again and i dont want this. I want to start the counting as soon as a item is added and then remove the item after the time stored in it has elasped. Btw im adding items with keys for now. So there maybe a lot of items added at the same time.
If possible please provide screenshot of solution.