Way to know the time of cursor

Hi guys.

I’m writing small nyquist plugin for automatically adding label corresponding boundary within track.
To decide whether it’s time to exit from the loop, I need to know the actual point of time of the cursor. But reference manual on the site no gave me the help.
Does anyone know the good way to do that?

;nyquist plug-in
;version 4
;type tool
;name "Automatic label numbering"

(aud-do "NewLabelTrack")
(aud-do "CursTrackStart")

(setq x 0)

  (aud-do "CursNextClipBoundary")
  (aud-do "CursPrevClipBoundary")
  (aud-do "SelCursorToNextClipBoundary")
  (aud-do "AddLabel")
  (setq y (+ x 10000))
  (setq command (format nil "SetLabel: Label=~a Text=~s" x y))
  (aud-do command)
  (setq x (+ x 1))
  (when (> x 5) (return x))

Yes, look at the Selection Tololbar at the bottom of the Audacity window - there you will see a box called Audio Position - that shows the current cursor position when playback or recording is not active.