The ts_current_offset() function

The ts_current_offset() function returns the offset for the last element returned by ts_next().

Syntax

mi_integer 
ts_current_offset(ts_tscan *tscan)
tscan
The scan descriptor returned by ts_begin_scan().

Returns

The offset of the last element returned. If no element has been returned yet, the offset of the first element is returned. For irregular time series, ts_current_offset() always returns -1.