updated to type of time_handler to api
Updated systime to volatile