I expect that gettimeofday()
will call a system call to do the work of actually getting the time. However, running the following program
#include &l
The use of dtrace instead of dtruss will clear your doubt. gettimeofday() is itself a system call. You can see this system call getting called if you run dtrace script.
You can use following dtrace script "dtrace1.d"
syscall:::entry
/ execname == "foo" /
{
}
(foo is the name of your executable)
to run above dtrace use: dtrace -s dtrace1.d
and then execute your program to see all system call used by your program