A cheap cycling computer (even ones under $15) will provide trip and odometer distance, as well as speed, and trip time.
I used one for years before going to a dedicated cycling GPS. My CatEye wireless lasted well over a decade. If I were buying one today I would go with a wired one because the wireless cycling computers can suffer from interference from HID lights.