You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require "hardware"
module Caju::Memory
extend self
def get_mem()
mem = Hardware::Memory.new
return mem.used.to_i
end
def get_mem_pct()
mem = Hardware::Memory.new
return mem.percent.to_i
end
end # module
Unhandled exception: Arithmetic overflow (OverflowError)
from lib/hardware/src/memory.cr:64:36 in 'percent'
from src/memory.cr:13:12 in 'get_mem_pct'
from src/caju.cr:29:20 in '__crystal_main'
The text was updated successfully, but these errors were encountered:
trying to get memory percent
The text was updated successfully, but these errors were encountered: