Implement led control in another module
This commit is contained in:
13
barista/test/compat.c
Normal file
13
barista/test/compat.c
Normal file
@@ -0,0 +1,13 @@
|
||||
/* Copyright (c) 2025 Rodrigo Arias Mallo <rodarima@gmail.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later */
|
||||
|
||||
#include "compat.h"
|
||||
#include <time.h>
|
||||
|
||||
unsigned long millis(void)
|
||||
{
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
|
||||
return ts.tv_sec * 1000UL + ts.tv_nsec / 1000000UL;
|
||||
}
|
||||
Reference in New Issue
Block a user