Trying to get button down time with mobile controls

I’m working on a mobile game and looking to get the time that user holds down a button on the screen. For the Windows games there is input down function that you can get the time from. Is there one for the mobile UI controls like the button?