You need to put each function call on its own thread and then start a monitoring of each thread individually. I don't know what language you're using, so I don't know what kind of code to show you. In some Java-ish pseudo-code, you might have something like:Runnable runner1 = new Runnable() { public void run() { f1(); } };Runnable runner 2 = ...long f1Time = getTime(); executor.submit(runner1); f1Time = getTime() - f1Time;long f2Time = ...System.out.println( f1Time + "\n" f2Time );

And then the same for f2(). You would then have two outputs on the screen for each function. The time elapsed (delta) would be the time of that particular function. This assuming you have setup an ExecutorService. There is also an option to hold until you tell all threads to go simultaneously if that works better for you. I know you didn't ask about Java, but that's one way. See: ExecutorService.