mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-06-11 21:08:16 +02:00
34 lines
1018 B
C
34 lines
1018 B
C
/*
|
|
* This file is part of the Pico Keys SDK distribution (https://github.com/polhenarejos/pico-keys-sdk).
|
|
* Copyright (c) 2022 Pol Henarejos.
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, version 3.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef _BOARD_H_
|
|
#define _BOARD_H_
|
|
|
|
#ifdef _MSC_VER
|
|
#include <windows.h>
|
|
#else
|
|
#include <sys/time.h>
|
|
#endif
|
|
|
|
static inline uint32_t board_millis() {
|
|
struct timeval start;
|
|
gettimeofday(&start, NULL);
|
|
return start.tv_sec * 1000 + start.tv_usec / 1000;
|
|
}
|
|
|
|
#endif // _BOARD_H_
|