MaD dUCK on Fri, 23 Feb 2001 22:07:24 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Programming Question


also sprach Charles Stack (on Fri, 23 Feb 2001 09:54:34PM -0500):
> Anybody know how to get the equivalent of Window's GetTickCount() method
> under Linux in C or C++?  Need millisecond resolution and time.h doesn't
> appear to give us the resolution we need.

check out ftime(3) and the timeb struct. that's what is commonly used
for millisecond resolution. i am not quite sure whether what you want
is process timing, in which case gabe's answer will do you better, or
utc/localtime, in which case ftime is your choice.

don't know what GetTickCount() does, i did manage to forget that
entire windows api, didn't i... in only a year... pffff.

martin

[greetings from the heart of the sun]# echo madduck@!#:1:s@\@@@.net
-- 
fermentation fault.
coors dumped.


______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug