#include <stdio.h>
#include "BpPort.h"
#include <sys/time.h>
#include <time.h>

portTickType xTaskGetTickCount()
{
	struct timeval tv;
	portTickType result;
	unsigned long intermediate;
	
	gettimeofday(&tv, NULL); 
	  
	intermediate = tv.tv_sec * 1000;
	result = intermediate + (tv.tv_usec / 1000);
	
	return result;
}
