I am working on a Lumia 520 mobile. I wish to execute a particular function exactly during the exposure time of the camera. For this, I have used the following capture function(I have modified the code from "Advanced photo capture for Windows Phone 8" ):
public async void capture()
            // Take a picture. Flag busy meanwhile.
            cam_busy = true;
            await _camsequence.StartCaptureAsync();
            cam_busy = false;
            transmit = true;
            imstream.Seek(0, SeekOrigin.Begin);
In the MainPage class, I check for cam_busy and then run the program. However, the cam_busy is true for time longer than the exposure time. Is there any better way to do it?