Last updated 3 months ago
Just turn on the timer in menuconfig
In user code, you can use <sys/time.h> the header files provided by these timers to program
<sys/time.h>
#include <sys/time.h> #include <stdio.h> int main(void) { time_t sec; time_t ret; time_t timestamp = 1609459200; ret = time(&sec); if(ret != sec) { return -1; } if(ret != timestamp) { return -1; } return 0; }copymistakeCopy Success