What language? In Java I'd build a NavigableMap (TreeMap) of timecode -> real time, and then lookup the floorEntry( timecode)
to find the nearest entry.
Of course, you'll need to calculate/ empirically determine the correspondence & build the map; either all beforehand, or growing the extents on-demand.
One thing that's unclear about your question.. can you exactly reverse-engineer the timecode calculation, or is this just an approximation & you are going to search for the exact position from there?