Continuous liberalization of electricity markets makes a strong correlation between the economic behaviors of market participants and their profits. To guide the production of generators before the market reaches equilibrium, a new framework is proposed to model the real-time electricity market with help of optimal control theory. The market price is described as the dynamic state using a sticky price model. We establish an N-person non-cooperative differential game model, where all participants try to maximize their profits independently only by observing power prices. The existence of feedback Nash equilibrium and uniqueness of optimal price trajectory are proved in detail, which will help other scholars build an effective differential game model. To protect the privacy of all generators, a distributed algorithm is proposed based on neurodynamic and consensus theory, which only requires information exchange among neighboring participants. Furthermore, a special case of a duopoly power market is investigated in detail and we provide a feedback time-continuous solution for each generator. Compared with the commercial Cplex solver, the proposed distributed algorithm performs better in convergence speed.