In both my fitness boxing class and my use of the pomodoro system, I work to a timer. This has a number of benefits.
First, you can endure almost anything if you know it is going to end. Anyone who has worked to a deadline knows that there is a surge of energy when close to competing a goal or enduring a period of time. Crossfit used this principle for a fixed number of repetitions. The military uses this principle by telling recruits that they have more to do such as run or hike after being told beforehand that they have a certain amount to complete. Tabata protocols are also very useful for working out.
The other reason, is based on choice architecture. By removing choices it helps you to concentrate. By working to set routine or even better a timer, it takes your own feelings out of the equation by removing you from decision-making.
Whether working out, working at a task you would rather not do, or studying, working with an actual timer is an excellent aid to increase your output whether it is work or working out.