How to set Count down timer in android

view story

http://stackoverflow.com – We are designing a app in android.When user logs into the app i need to send a web service call and i need to to validate the user .If the login is successful then i need to save those username and password into the database and the current time. If the user again tries to login with in 24 hours i need to use same username and password which saved in the database.(I need to compare the time from database with current time) But here the problem, if the user change time in his android tab this scenario is not working. So i want to set a timer for 24 hours and i will insert a column in databas (HowTos)