Been doing a bit of reading on attention span and activity, it takes 15 minutes to get into the flow of a task without any disruption factor.
If you enjoy the task you can sustain focus for about 40 minutes without a rest.
If you do not enjoy the task, a change is as good as rest, walkaway from the job.., look at something in nature for 10-15 minutes then refocus on the task, you will find it will be easy to do second time around, failing that, go back to nature, have a walk under the trees.