time_s implementation