debug code to measure how long calls to system() take