MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / gettime

Function gettime

examples/test/avl.c:298–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296#include <time.h>
297
298static int gettime(void)
299{
300 struct timespec ts;
301 clock_gettime(CLOCK_REALTIME_COARSE, &ts);
302 time_t seconds = ts.tv_sec;
303 int millisecond = ts.tv_nsec / 1000000;
304 return millisecond + seconds * 1000;
305}
306
307/* Adapt Layer */
308

Callers

nothing calls this directly

Calls 1

clock_gettimeFunction · 0.85

Tested by

no test coverage detected