public byte GetFrameCountFromTime(double milliseconds) { return (byte)(milliseconds / frameInterval); }