use getrusage() to measure CPU time on non-windows platforms