tags:

views:

116

answers:

2

Hey,

The question speaks for itself : is there a convenient wrapper for system specific function in Qt, so I can tell how much is the current resources usage ?

I want to execute some expensive task when the system is idle. For your information (I might need to put that in another question), I want to calculate the content hash of a file. I thought of doing it by streams instead of a basic readAll followed by a call to QCryptographicHash, but didn't find how to do it yet, so i'm stuck with reading the whole file and calling hash()...

A: 

You need to use platform specific code to detect resource usage.

For fastest file access to calculate hashes, use memory mapped files (QMemoryFile)

rep_movsd
There is no such class as QMemoryFile since Qt 2.3. Where did you get this info from?
chalup
My bad, I remember using that long, long back, never realized it was gone.
rep_movsd
A: 

To get the system data in Linux, you can read '/proc' and display info.

For Windows, you may want to look at WMI queries.

Jack