Not functional on the cab screen, but OR has had an odometer for well over 5 years now. It functions as an on-screen distance counter that can be seen in all cab views (even outside ones). The counter starts rolling as your train begins to move and keeps accumulating as it goes on rolling.

SHFT Z toggles the display on/off and CTRL Z resets it to 0. You can reset it anytime without having the counter visible on the screen. If you know your train length, hit reset upon passing the measurement start point and then at your leisure bring the counter up on the screen.