#include <time.h>
#include <stdio.h>
#include "debug.h"
#include "misc.h"
//#include <sys/time.h>

int time_to_millisecond(double interval)
{
	return interval / TIME_SCALE;
}

void print_frame_info(clock_t start, clock_t finish, int rays)
{
	static double interval;

	interval = (double)(finish - start);

	printd(FRAME, "time:%.2f\tfps:%.2f\tintct:%i\n", 
			interval/TIME_SCALE, 1.000 / interval*TIME_SCALE, rays);
//	printd(FRAME, "start:%f \tend:%f\t \n", 
//			start, finish);

}
/*
void print_frame_info(struct timeval *start, struct timeval *finish, int rays)
{
	static double interval;
	
	interval = (double)(finish - start);

	printd(FRAME, "time:%.2f\tfps:%.2f\tintct:%i\n", 
			interval/TIME_SCALE, 1.000 / interval*TIME_SCALE, rays);
//	printd(FRAME, "start:%f \tend:%f\t \n", 
//			start, finish);

}*/
