What data structures does it use?
Then all the files have a prefix that look like <startsec>_<startmicrosec>_<metric>. A binary search is perfomed first on files in order to pick the right files only. Then the index is read into memory, then binary search performed on the index to get the offset range and then the main data file is read.
When switching to new file time chunk, a cleanup action is peformed where previous old files are removed.