timer lib hook with localSrorage