Animation Sequence Time and Tracks

Hello again. I am trying to set the number of frames of an anim sequence in c++. I am currently using the SetRawNumberOfFrames function. The number of frames is updated, however, the time length stays the same. How can I add both frames and seconds to an animation sequence using c++?

Thanks in advance,