update time socket function