time system call expensive?

Vadiraj <[email protected]> Thu, 21 Jul 2011 10:11:14 +0530
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <CA+NBAy6499cgdzwGuPk6h+Y3D-DxEHP2HEKjtNAgis7K4RTKig@mail.gmail.com>
Hi All,

I'm evaluating time consumed by method. I'm using time(NULL) system
call to capture time before and after the call to the function.
Just wanted to know if this has a considerable performance hit? For
all I believe time syscall is quite optimized and should not really be
matter of concern.

Please let me know if someone have evaluated time(NULL) system over head..

Assuming the method I'm evaluating is a frequently called method.


Thanks in advance.

Regards,
Vadi