We consider a ruin model where the surplus process is formed by a Brownian motion. If the level of surplus exceeds V, then we assume that a insurer invests an amount of S to other place. In this paper, we apply martingale methods to the surplus process and obtain the expectation of period T, time from origin to the point where the level of surplus reaches either V or 0. As a consequence, we finally derive the total and average amount of surplus during T.