lfreist / hwinfo

cross platform C++ library for hardware information (CPU, RAM, GPU, ...)
MIT License
433 stars 74 forks source link

fix: int overflow in get_jiffies #57

Open innerlee opened 10 months ago

innerlee commented 10 months ago

The number in the results could be larger than the maximum int value. This is fixed by using long.

lfreist commented 9 months ago

Thank you for your contribution and sorry for the delayed reply! Just checked it and it seems that the jiffies variable is unsigned long in the linux kernel... Could you change the type to uint64_t? Thanks!