Data Fiield: can listen to button press or access current activity FIT file?

I'd like to develop a data fild that shows last n laps times and I need to calculate time between start and each lap (lap press or automatic) or access the in-progress FIT file.
There are methods for this?