Chess - Programming - Time Controls
Consider:
Total time allowed for the game.
How many moves are left in the game.
Simply divide (the total time left) by (the estimated moves left).
If there is a time advantage over the opponent (i.e. the opponents has less time), then also allocate part of that time advantage for the next move.