Rapid measurement of the net charge on nanoparticles in optical levitation system