Annotation of 43BSDTahoe/new/notes/src/ftime.c, revision 1.1

1.1     ! root        1: #include "parms.h"
        !             2: #include "structs.h"
        !             3: 
        !             4: #ifdef USG
        !             5: #ifdef RCSIDENT
        !             6: static char *SccsId = "@(#)ftime.c     2.4     4/20/84";
        !             7: static char *RCSid = "$Header: ftime.c,v 1.7.0.1 85/02/06 08:44:29 notes Rel $";
        !             8: #endif RCSIDENT
        !             9: 
        !            10: /*
        !            11:  *     This file performs the "ftime" call for systems which
        !            12:  *     no longer support that system call.
        !            13:  *
        !            14:  *     Currently, this is only the USG systems: System III, System V,
        !            15:  *     and UNIX 4.0 (btl-internal)
        !            16:  *     This code is only compiled for these systems; the entire file
        !            17:  *     is surrounded by an #ifdef USG
        !            18:  *
        !            19:  *     this code taken from news 2.10
        !            20:  */
        !            21: 
        !            22: #include <sys/types.h>
        !            23: struct timeb
        !            24: {
        !            25:     time_t time;
        !            26:     unsigned short  millitm;
        !            27:     short   timezone;
        !            28:     short   dstflag;
        !            29: };
        !            30: 
        !            31: extern long timezone;
        !            32: extern int  daylight;
        !            33: 
        !            34: ftime (tp)
        !            35: struct timeb   *tp;
        !            36: {
        !            37:     long    t;
        !            38: 
        !            39:     time (&t);
        !            40:     tp -> time = t;
        !            41:     tp -> millitm = 0;
        !            42:     tp -> timezone = timezone / 60;
        !            43:     tp -> dstflag = daylight;
        !            44: }
        !            45: #endif USG

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.