mirror of
https://github.com/irmen/prog8.git
synced 2024-12-25 23:29:55 +00:00
avoid division by zero if host fs hyperload is used which loads instantly
This commit is contained in:
parent
79d0fb0b52
commit
7b59bc8d12
@ -10,6 +10,10 @@ main {
|
|||||||
const ubyte REPEATS = 2
|
const ubyte REPEATS = 2
|
||||||
|
|
||||||
sub print_speed(uword jiffies) {
|
sub print_speed(uword jiffies) {
|
||||||
|
if jiffies==0 {
|
||||||
|
txt.print("\n 0 jiffies measured, speed is extremely high\n")
|
||||||
|
return
|
||||||
|
}
|
||||||
float speed = 65536.0 * REPEATS / (jiffies as float / 60.0)
|
float speed = 65536.0 * REPEATS / (jiffies as float / 60.0)
|
||||||
txt.nl()
|
txt.nl()
|
||||||
txt.print_uw(jiffies)
|
txt.print_uw(jiffies)
|
||||||
|
Loading…
Reference in New Issue
Block a user