fork download
  1.  
  2.  
  3.  
  4. //进入下一秒的教程:
  5.  
  6. //第一步:点击 📝edit
  7.  
  8. //第二步:点击 ♻️submit
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16. #include <stdio.h>
  17. #include <time.h>
  18.  
  19. int main() {
  20. setenv("TZ", "Asia/Shanghai", 1);
  21. tzset();
  22. time_t t = time(NULL);
  23. struct tm *current_time = localtime(&t);
  24. int frame = (current_time->tm_hour * 3600 + current_time->tm_min * 60 + current_time->tm_sec) * 24;
  25. printf("时间: %04d-%02d-%02d %02d:%02d:%02d\n帧数: %d\n试一试下一秒!🦁\n",
  26. current_time->tm_year + 1900, current_time->tm_mon + 1, current_time->tm_mday,
  27. current_time->tm_hour, current_time->tm_min, current_time->tm_sec, frame);
  28. return 0;
  29. }
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. // ♻️ submit
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44. //
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
时间: 2025-02-19 16:27:33
帧数: 1422072
试一试下一秒!🦁