Make me a fake loader
Powershell, 71 68 65 Bytes
Similar to https://codegolf.stackexchange.com/a/101357/59735
Saved 3 bytes by not being an idiot (left the ... on loading)
-3 thanks to VisualMelon
changed 750 -> 751 to make sure 750 is included.
0..100|%{cls;"loading $("|/-\"[$_%4]) $_ %";sleep -m(random 751)}
Explanation:
0..100|%{ #For range 0-100...
cls #Clear Display
"loading $("|/-\"[$_%4]) $_ %" #Display the current string
sleep -m(random 750) #Sleep random ms up to 750
}
Updated gif
Python 2, 119 113 112 Bytes
I had originally gone with the random amount being random()/.75
, however the endpoint wouldn't be included. There isn't much difference from this to the other question for the infinite load time except for the randomness and the fact that it actually ends.
import time,random as r
for i in range(101):print'\rLoading','-\|/'[i%4],i,'%',;time.sleep(r.randint(1,750)/1e3)
thanks to Jonathan Allan for saving 6 bytes, and DJMcMayhem for saving a byte!
*><> (Starfish), 86 82 bytes
| v1*aoooooooo"loading K"&0"-\|/"
!0x1! +
%$<.0+af{od;?)*aa&:&Soono$&+1:&" %"{o:}
Try it here!
This may be able to be golfed more, but I don't see anything super obvious. It sleeps 100ms, 400ms, or 700ms, if this isn't random enough, let me know!
Thanks to @TealPelican for saving me 4 bytes and making it much more random!
The biggest challenges I found (while still trying to keep it small) were randomness, and actually outputting "loading - 100 %" at the end, instead of just exiting at my nearest convenience :p.