From: khan@xraylith.wisc.edu (Mumit Khan)
Subject: Re: ?? sys/timeb.h ??
1 Feb 1998 11:11:17 -0800
Message-ID: <9802011857.AA10048.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <3.0.2.32.19980131121107.0096d930@pop.service.ohio-state.edu>
To: "Philip A. Viton" <pviton@magnus.acs.ohio-state.edu>
Cc: gnu-win32@cygnus.com

"Philip A. Viton" <pviton@magnus.acs.ohio-state.edu> writes:
> Can anyone provide me with some information on this include file?  I have a
> unix program (Peter Wilson's ltx2x) which seems to require it (and he
> claims that it is standard on unix systems) but it isn't in the b18
> distribution.

I assume the program is using ftime, which is not part of POSIX. I
believe that ftime was in the original V7, and does exist as an
obsolescent feature of BSD 4.3.

Look at time(), possibly followed by localtime(). Something like the
following:
  
  #include <time.h>
  int foo () {
      time_t t;
      struct tm *tms;

      t = time (0);
      tms = localtime (&t);

      /*
       * tms now has all the information, and more, that you need. Also
       * look at tzname, timezone etc globals.
       */
  }

Do look up the docs before you use these routines of course ...

Regards,
Mumit -- khan@xraylith.wisc.edu
http://www.xraylith.wis.edu/~khan/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
