nethacker / usagewatch

A Ruby Gem with methods to find usage statistics on a Linux server such as CPU, Disk, TCP/UDP Connections, Load, Bandwidth, Disk I/O, and Memory
MIT License
79 stars 38 forks source link

reduce sleep time for multiple methods #12

Open akwiatkowski opened 10 years ago

akwiatkowski commented 10 years ago

usw = Usagewatch usw.batch_refresh # one "long" method with 1 second sleep usw.uw_cpuused(false) # use data fetched before usw.uw_cpuused(true) # regular, old way usw.uw_cpuused # regular, old way

If you need to get more than one time consuming parameters it could be very useful.