Generation

generate functionWed, 07 Jun 2023

获取x86机器的tick数

++ #include <time.h> long int get_tick_count() { struct timespec ts; long int tick = 0; clock_gettime(CLOCK_MONOTONIC, &ts); tick = ts.tv_sec * 1000 + ts.tv_nsec / 1000000; return tick; }

Want to kickstart your project?Use the new AI Studio to create your code