I personally set my time by album length. Depending on the work I need to do in the next block, I can range anywhere from 30min to 2hr. Typically it's in the range of 45-80min. I have a few key albums that I listen to often and when listening to those can now subconsciously pace my work to a certain extent.
Of course, you need to be the kind of personal that likes to listen to music while working in order for this to work.
I've been using Rhythmbox to play music, and in it you have a play queue in addition to being able to play directly from the library. It conveniently tells you how long total time in the play queue is. I often toss an album in there, then trim it to the amount of time I have before I want to stand up. There's usually a track or two that could stand to be removed.
I like energetic music for things that are mostly implementation and little thought (e.g. Dragonforce). While I use more relaxed, less vocal music for things that are mostly planning and thinking (e.g. cello concertos or Mogwai)
Of course, you need to be the kind of personal that likes to listen to music while working in order for this to work.