compile time error when calling getmicrotime()
Poul-Henning Kamp
phk at phk.freebsd.dk
Thu Mar 27 06:28:37 PST 2003
In message <20030327142643.GA58757 at postel.libkvm.org>, freebsd at libkvm.org write
s:
>hi,
>
>i am trying to call getmicrotime(&tv) in a program but i
>get the following error when compiling :
>
>/tmp/ccfMfSM6.o(.text+0xe): undefined reference to `getmicrotime'
>
>yes, i have declared '#include <sys/time.h>' :-)
>
>FreeBSD 5.0-RELEASE-p4 i386
>FreeBSD 4.7-RELEASE-p9 i386
That is a kernel function you are trying to call.
Use gettimeofday(2)
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-bugs
mailing list