The default dopesheet framerate is 30 fps. So, if you haven't changed it, 30 frames in Spine is 1 second of playback. At runtime you can get the Animation duration
, which is already in seconds.
It sounds like you are guessing at the cause of whatever problem you are seeing. Try just explaining exactly what is happening and what you expected instead.