I try to give my kids warnings, such as "In 10 minutes, you need to start your homework." Sometimes I use a timer. That way there are no surprises and if they need to save a game or wrap something up in the 10 minutes, they have a chance. I don't really think you did anything wrong in terms of not giving him the extra 10 minutes, as long as you gave him a warning rather than "Ok, you need to stop now." (and he had no idea).