Move sectors to time code to its own function.

Use it for total length as well as tracks.
Use "sector" instead of "frame" to be consistent.