The printer tracks printing statistics. When you access this option during a print, you will see statistics for the running print. If you do so while the printer is idle, you will see the total statistics. Both filament usage and print time are tracked.
You can find this menu in the LCD Menu -> Statistics. The data can be easily reset once you do a Factory reset (MK2S/MK2.5S/MK3S).