The Priority Queue is implemented using a Max Heap data structure organized in a python list. When the priority of the incoming commands are the same, the timestamps are used as a tiebreaker for determining the final priority.
The enqueue and dequeue processes each take O(log n) time.
The code was implemented in Python 3 and includes unit tests to test success and failure cases.