Time evolution of terrestrial gamma ray flashes