I'm not sure I understand your question. It sounds like you know how to calculate the angle of where the text will be placed.
If that's the case, then divide the clock into four uneven parts: T = (−20deg, 20deg), R = (20deg, 160deg), B = (160deg, 200deg), L = (200deg, 340deg). If the text is in T or B, calculate the height of the text, and place the text above/below the circle by that height + margin. If the text is in L, then calculate the length of the text and start the text len($string)+$margin to the left of the angle you want to place it at. If the text is in R, then start the text $margin to the right of the circle.
You might also find a good answer in the R source code for plot.