Fool around

To spend time playing rather than working, to waste time.

If the man would spend less time fooling around he would be able to get more work done.