/* * 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 . */ #ifndef _BOARD_H_ #define _BOARD_H_ #ifdef _MSC_VER #include #else #include #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_