     }
 
     public function getFps():Number {
-      return 1337;
+      if (timestamps.length < 2) { return 0; }
+      var loadTimesSum:Number = 0;
+      for (var i:uint = 1; i < timestamps.length; i++) {
+        loadTimesSum += timestamps[i] - timestamps[i - 1];
+      }
+      return 1000 * (timestamps.length - 1) / loadTimesSum;
     }
 
   }


  public class MJPG extends Sprite {

    private var ipCam:IPCam;
    private var maxImages:uint = 2;
    private var firstImage:Boolean = true;
    private var imgBuf:Vector.<Object> = new Vector.<Object>();
    private var idleQue:Vector.<MJPGImage> = new Vector.<MJPGImage>();
    private var playing:Boolean = false;

    public function MJPG(ipCam:IPCam) {
      this.ipCam = ipCam;

    }

    private function createLoaders():void {
      for (var i:uint = 0; i < MAX_IMAGES; i++) {
        var loader:MJPGImage = new MJPGImage();
        loader.cacheAsBitmap = false;
        loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
