Of course, the zg_cpu routine is HIGHLY dependent on the OS and the compiler.
The one provided is strictly a sample.
If you're using a single-user system, wall-clock time is the way to go.
What system (if I may ask) are you using?
As I had said, CTA can help if you can fund it. I can provide bits and pieces
of advice (on a spare-time basis) -- I think this is part of my responsibility
as PIWG chair.