calculate fps