I am trying to log the timing of executing a procedure that returns a ref cursor.
That is EXACTLY what your code is already doing.
How do I log the time it takes to return all rows?
Your procedure does NOT return any rows.
1. It logs an entry that the proc started
2. It opens a ref cursor
3. it logs an entry that the proc ended
4. it exits and returns the ref cursor.
That's all that it does. Your procedure is finished - it has NO connection with or knowledge of who, or what, called it or what that caller does, if anything, with that ref cursor.
The caller of that procedure can:
1. do nothing at all with the ref cursor
2. pass the ref cursor to some other process (which may, or may not, do something with it)
3. FETCH one or more rows
4. FETCH all rows
Since that 'caller' could be a 'client' using sql*plus to do the fetch there isn't anything you can code on the back end to determine the time to 'return all rows'.