If the question is "how long should I spend on a question if I'm 100% sure I will get the right answer", the answer is "quite a long time". It's actually worth spending at least 3.5 minutes on a question if you absolutely know you'll get the question right. I can explain why that's true - the algorithm is designed so that you answer questions at your level correctly 60% of the time. So, say after spending 1.5 minutes on a question, you can see you'll get the answer in 3.5 minutes total. You're then getting 1 right answer. Then if you guess randomly at the next question, you'll get that right 20% of the time, for a total of 1.2 right answers on those two questions, with about 4 minutes invested. But if after 1.5 minutes on a question, you're down to (and this would be the best case) 50-50, and you decide to guess and move on, then you are only getting 0.5 right answers on that question, and then with a full 2 minutes for the next question you still can only expect to get 0.6 right answers, for a total of 1.1 right answers. So that doesn't work out as well as the first case.
Of course the scoring isn't strictly based on the number of questions you answer correctly, but when you account for how the algorithm adapts, it's even better to get the question in front of you right - that usually means the next question will be harder, and the harder the question, the less harmful it will be to your score if you get the question wrong (or if you guess at it).
But in practice, it's rarely true that you can be completely sure you'll get to a right answer if you invest more time. Most of the time, in GMAT math, if you can't see a path to the answer in the first minute or so, you're missing something, and it's hard to guess how long it will be before you 'see it' - it could take all day. So if you don't have a clear path to a solution after a minute of thought, you almost always should commit to moving on quickly. Evaluate any fallback strategies you might use (picking numbers, backsolving, estimation) and those might at least help you guess well, but save your time for other questions where investing time will clearly be valuable. It is true that most questions will appear manageable on the GMAT if you're well-prepared, but don't be misled - a lot of questions are much trickier than they look. If you think, on a geometry question, "I must be able to solve this, it's just a triangle" but you aren't getting anywhere after a minute, it's probably a much harder question than it seems. Those aren't questions you should be persisting with, or you'll find you don't have time to answer questions you could easily solve later in the test.
Making good decisions about where to invest time is a skill you develop with practice, so use realistic practice tests (GMATPrep tests) to practice pacing strategy, and to develop the discipline to move on from questions where you're not getting an answer. You can then confirm from your score that your pacing strategy is improving your results.
_________________
http://www.ianstewartgmat.com