[MUD-Dev] Ticks?

David B. Held dheld at codelogicconsulting.com
Fri Jun 14 00:38:22 CEST 2002


From: "Eli Stevens" <listsub at wickedgrey.com>

>   #include <sys/timeb.h>       // and <sys/types.h> under win32 (?)
>   int ftime(struct timeb *tp); // void _ftime under win32, but I suspect
>                                // that ftime is a macro that does the
>                                // same thing

> I went through this a few months ago, looking for a millisecond
> accurate wall clock time function.  I was somewhat surprised at
> how long it took me to find it (maybe I was using the wrong search
> terms :).  Also note that it is timeb.h, not time.h (which may
> have been another reason it wasn't easy to find - I may have only
> been looking in time.h docs).

That would be because it is a BSD function.  The man page on my
server says it is obsoleted by gettimeofday().  One would assume
that it's faster, because it doesn't do date calculation, but on the
other hand, I don't call gettimeofday() an exorbitant number of
times, either.

Dave


_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list