How to exit meditation? I am new to meditation (anapana) as a daily practise: I've been to one retreat, some 4 years ago, noticed how meditation helped me, and then never mediated again. I always knew I should get back to meditating, and so I did: I've been meditating for about a week now, at least once a day (sometimes twice), each section lasting between 20 and 30 minutes. In the beginning I couldn't meditate for more than 10 minutes, but that changed after some sections.

I have now a weird problem: I'm not sure about when should I exit my meditation. When I experience thoughts my reaction is to be aware of them and internalise the word "thoughts", "thoughts", until they pass. The thing is that sometimes the thought that comes up is "man, damn, you've been meditating for 45 minutes... Time to stop". I try to put this though in the basket of "thoughts", but at the same time I know I must stop meditating sometime. I then start to wonder if I should stop meditating or if this thought is a product of my anxiety. By that time my practise is already spoiled.

I considered timing my meditation, then. Unfortunately, when I do that, sometimes the alarm rings too soon and I'd like to meditate more, and sometimes I'm already worrying about when is it going to ring. 

This might be a senseless question, but is there a way to decide it's time to stop meditating?
I disagree with Sumida and ChrisW, an hour is too long for beginners and experts alike. In Zen monasteries we do zazen for between 30 - 45 minutes followed by about 10 minutes of kinhin (fast or slow walking meditation), then another period of zazen. For a beginner 20 minutes (or even less) is fine. In time you should aim to raise it to around 30 mins. If you want to do more you should break it up with kinhin (or possibly some yoga).

I agree with Chris that you should use a timer (a countdown timer on a digital watch is ideal). When the timer goes off, then get up (some people sway gently from side to side before getting up). You shouldn't be pondering during meditation whether to get up or not, a) you shouldn't be pondering things during meditation and b) if you practise like this you will turn meditation into an aesthetic experience (I'm enjoying this so I'll sit longer/I'm not enjoying this so I'll get up) which is not right meditation.