Unless it specifies in the function name (e.g. getTimeBeats) time is in seconds.
The best description of “beats” is in one of the settings comments:
/** If this returns true, it means that the length (in seconds) of one "beat" at
any point in an edit is considered to be the length of one division in the current
bar's time signature.
So for example at 120BPM, in a bar of 4/4, one beat would be the length of a
quarter-note (0.5s), but in a bar of 4/8, one beat would be the length of an
eighth-note (0.25s)
If false, then the length of one beat always depends only the current BPM at that
point in the edit, so where the BPM = 120, one beat is always 0.5s, regardless of
the time-sig.
You shouldn't dynamically change this function's return value - just implement a
function that always returns true or false.
*/
virtual bool lengthOfOneBeatDependsOnTimeSignature() { return true; }
(I’m changing the default to true as this makes more musical sense and is what we use in Waveform).
The simplest thing to do is look at TempoSequence and the various conversion methods it has timeToBeats, timeToBarsBeats, beatsToTime etc.
One day we’ll add a class to encapsulate this but it will still need a TempoSequence to do the conversion between beats/time.