update timecounter : change system function for time. It was deprecated