Moving string position in array

First question is are your alarm messages fixed or dynamic? "Door open" is an example of a fixed alarm message that is always the same when the door is open. "Overvoltage 3879V" is an example of a dynamic alarm message that varies depending on what the sensed voltage is. If your messages are fixed, setup an array of strings with your messages and include the message array index with your timestamp in the array of alarms.

Rather than move elements in your alarm array, just shift the insertion point. To output the array in reverse time order, work backwards from the insertion point. For forward time order, move forward in the array from the insertion point.