Adressing response time errors.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-01-18 21:40:02 -05:00
parent b3d8adec7e
commit 6e9bb2a5f8
1 changed files with 5 additions and 2 deletions

View File

@ -155,11 +155,14 @@ Invidious >> region: countryISOCode [
{ #category : #accessing } { #category : #accessing }
Invidious >> responseTime [ Invidious >> responseTime [
^ [ ZnClient new | responseEvaluation |
responseEvaluation := [ ZnClient new
beOneShot; beOneShot;
url: self uri; url: self uri;
get; get;
response ] timeToRun response ].
[ ^ responseEvaluation timeToRun ] onErrorDo: [ ^ 1 class maxVal asDuration "Internal convention for max duration when an error raises." ].
] ]
{ #category : #accessing } { #category : #accessing }