gabriel rosenkoetter on Fri, 23 Feb 2001 22:21:32 -0500


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

Re: [PLUG] Programming Question


On Fri, Feb 23, 2001 at 10:08:18PM -0500, MaD dUCK wrote:
> 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.

Hrm... wasn't ftime replaced by gettimeofday like about eight years
ago?

Ah, yes, but that only gives secs and usecs (not that that wouldn't
probably cut the mustard, but still).

Actually, I recall some people (Tom?) using ftime do that
architecture lab (sampling the clock immediately before and after a
loop of testing some speed-related thing in the processor's cache),
I'm sure it'd work just as well.

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

Gee, not bitter or anything. ;^>

       ~ g r @ eclipsed.net


______________________________________________________________________
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