Improved compatibility with various GCC-supported C language standards (like -std=c11)

This commit is contained in:
Ilia Sharin
2017-08-06 19:14:48 -04:00
parent d194969249
commit 9c261b76e8

View File

@@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <time.h>
#include <stdio.h>
#include <unistd.h>
#include <stdint.h>
#include "hardware.h"
#include "user_io.h"
@@ -52,9 +53,10 @@ void hexdump(void *data, uint16_t size, uint16_t offset)
unsigned long GetTimer(unsigned long offset)
{
struct timespec tp;
clock_gettime(CLOCK_BOOTTIME, &tp);
unsigned long long res;
clock_gettime(CLOCK_BOOTTIME, &tp);
int64_t res;
res = tp.tv_sec;
res *= 1000;