Update on the sdldemo

I’ve redone the hr_time,h and c files and am much happier with them now and also updated the code on github.  Apparently the reason for having <linux/time.h> as well as <time.h> and including both is because the <time.h> is set in stone and any additions have to be done as an extra include file. This is what hr_time.h looks like now.

#ifndef _timeh
#define _timeh 1
#include <linux/time.h>
#include 

struct _times {
  struct timespec start;
  struct timespec stop;
};

typedef struct _times stopWatch;

void startTimer(stopWatch *timer);
void stopTimer(stopWatch *timer);
double diff(stopWatch *timer);

#endif

 

Leave a Reply

Your email address will not be published. Required fields are marked *