Add some randomness to loading messages
This commit is contained in:
1 parent
b0e0c2d09d
commit
2502eae462
1 file changed
+7
-1
@@ -16,7 +16,7 @@ function GetLoadingMessage() as string
|
|||||||
"Updating: 3 hours 32 minutes remaining...",
|
"Updating: 3 hours 32 minutes remaining...",
|
||||||
]
|
]
|
||||||
end if
|
end if
|
||||||
index = Rnd(messages.count()) - 1
|
index = GetRandom(0, messages.count() - 1)
|
||||||
return messages[index]
|
return messages[index]
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -27,3 +27,9 @@ function GetLoadingMessagesFromCache() as object
|
|||||||
end if
|
end if
|
||||||
return ParseJson(messagesFile)
|
return ParseJson(messagesFile)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function GetRandom(min as integer, max as integer) as integer
|
||||||
|
dateTime = CreateObject("roDateTime")
|
||||||
|
random = Rnd(max) + dateTime.GetMilliseconds()
|
||||||
|
return min + (random mod (max - min + 1))
|
||||||
|
end function
|
||||||
Reference in new issue
Block a user