timer - How to calculate time in android .? -


i want calculate time after button pressed ,so can keep track has been passed.i have search , find android timer can couldn't useful answer that.

thanks in advance.

on start button press:

long start = system.currenttimemillis(); 

on update/end button press:

long runtime = system.currenttimemillis() - start; 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -