This is unixtime.c in view mode; [Download] [Up]
Changes file for /usr/local/src/kcl/c/unixtime.c Created on Thu Oct 5 22:48:50 1989 Usage \n@s[Original text\n@s|Replacement Text\n@s] See the file rascal.ics.utexas.edu:/usr2/ftp/merge.c for a program to merge change files. Anything not between "\n@s[" and "\n@s]" is a simply a comment. This file was constructed using emacs and merge.el Enhancements Copyright (c) W. Schelter All rights reserved. by (Bill Schelter) wfs@carl.ma.utexas.edu ****Change:(orig (12 12 a)) @s[#include "include.h" #include <sys/types.h> @s|#include "include.h" #include <sys/types.h> #ifdef UNIX /* all we want from this is HZ the number of clock ticks per second which is usually 60 maybe 100 or something else. */ #undef PAGESIZE #include <sys/param.h> #endif #ifndef HZ #define HZ 60 #endif @s] ****Change:(orig (13 13 a)) @s[ @s| #ifdef SGI #undef BSD #define ATT #endif @s] ****Change:(orig (16 16 a)) @s[#include <sys/timeb.h> #include <sys/times.h> @s|#include <sys/timeb.h> #include <sys/times.h> #include <sys/time.h> @s] ****Change:(orig (40 40 c)) @s[ return(buf.tms_utime * 1000/60); @s| return(buf.tms_utime); @s] ****Change:(orig (91 91 a)) @s[ vs_push(make_fixnum(buf.tms_utime)); @s| vs_push(make_fixnum(buf.tms_utime)); vs_push(make_fixnum(buf.tms_cutime)); @s] ****Change:(orig (97 98 c)) @s[#ifdef BSD struct timeb buf; @s|#ifdef BSD static struct timeval begin_tzp; struct timeval tzp; @s] ****Change:(orig (100 102 c)) @s[ ftime(&buf); vs_push(make_fixnum(((buf.time-beginning.time)*1000+ (buf.millitm-beginning.millitm))*60/1000)); @s| if (begin_tzp.tv_sec==0) gettimeofday(&begin_tzp,0); gettimeofday(&tzp,0); /* the value returned will be relative to the first time this is called, plus the fraction of a second. We must make it relative, so this will only wrap if the process lasts longer than 818 days */ vs_push(make_fixnum((tzp.tv_sec-begin_tzp.tv_sec)*HZ + ((tzp.tv_usec)*HZ)/1000000)); @s] ****Change:(orig (107 107 c)) @s[ vs_push(make_fixnum((time(0) - beginning)*60)); @s| vs_push(make_fixnum((time(0) - beginning)*HZ)); @s] ****Change:(orig (112 112 c)) @s[ vs_push(make_fixnum((time(0) - beginning)*60)); @s| vs_push(make_fixnum((time(0) - beginning)*HZ)); @s] ****Change:(orig (137 137 c)) @s[ make_constant("INTERNAL-TIME-UNITS-PER-SECOND", make_fixnum(60)); @s| make_constant("INTERNAL-TIME-UNITS-PER-SECOND", make_fixnum(HZ)); @s]
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.