float GetTime(int val, float frameRate) { float time = 0; if (val != 0) time = val / frameRate; return time; }