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