ftp.nice.ch/pub/next/unix/database/yooda.1.3.s.tar.gz#/yooda/example/oo1/clock.h

This is clock.h in view mode; [Download] [Up]

#include <sys/types.h>
#include <sys/time.h>
#include <sys/timeb.h>

struct timeb Tbegin;
struct timeb Tend;

void timeBegin()
{
  int res = ftime(&Tbegin);
}

void timeEnd()
{
  int res = ftime(&Tend);
}

double timeDiff()
{
  double res = (Tend.time - Tbegin.time) ;
  res += ((float)(Tend.millitm)/1000) - ((float)(Tbegin.millitm)/1000) ;
  return res ;
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.