Question about connecting annotations to values in matlab

Hello

I am trying to use Matlab to retrieve a continuous recording with annotation labels. So far I have a session, the data set from the session, and the annotations and [value time] using the getEvents and getvalues methods.
My question is how do I properly associate the annotations to the correct time periods or is there a way to retrieve everything together?
Is it a matter of converting the annotation times to seconds and matching those with the eeg data timestamps, which appear to be in seconds and a function of the frequency or do I have something wrong?

Thank You