If your code is done then you could look at a special register (refer to manual) where one can read out last scan time..
If your application isnt done then refer to manuals and count each of the functions you use in the manuals there should be how much time each instruction adds to the scancycle..