time
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
#include <unistd.h>
|
||||
#include <libconfig.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "LS7366R.h"
|
||||
#include "ringbuffer.h"
|
||||
@ -77,12 +78,14 @@ int main (void) {
|
||||
start();
|
||||
|
||||
uint8_t ledTick = 0;
|
||||
struct timespec timestamp;
|
||||
|
||||
while (1) {
|
||||
uint32_t period = ringbufferGet();
|
||||
clock_gettime(CLOCK_REALTIME, ×tamp);
|
||||
|
||||
// add averaging and forming the struct here
|
||||
logmsg(LOG_DEBUG, "Period: %lu", period);
|
||||
logmsg(LOG_DEBUG, "s: %lu, ns: %lu, p: %lu", timestamp.tv_sec, timestamp.tv_nsec, period);
|
||||
|
||||
ledTick++;
|
||||
if (ledTick == 50) {
|
||||
|
Reference in New Issue
Block a user