Military mark time
The military drill command is "Mark Time, March!" to change from standing at attention to 'Marking Time' or to change from marching at 'Quick Time' to 'Marking Time'. The resulting action is to march in the same place, not to move in any direction.
The term can also be used to refer to doing a minor job or task while waiting for an opportunity to arise, thus the casual usage in slang as describing motion without progress - not getting anywhere. As with other military jargon it entered civilian use when a large portion of the population had military experience and understood the context.
- US Army Field Manual FM 22-5 DRILL AND CEREMONIES