Pass frame interval as method paramter rather than as global variable. Remove fps coefficient.