#include <iostream>
#include <string>
#include <vector>
#include <dirent.h>
#include <ctime>
using namespace std;
int main() {
time_t start_time = time(0);
// 文件夹路径
string data_path = "../data";
vector<string> data_list;
DIR* dir = opendir(data_path.c_str());
struct dirent* entry;
while ((entry = readdir(dir)) != NULL) {
if (entry->d_name[0] == '.') {
continue;
}
data_list.push_back(entry->d_name);
}
closedir(dir);
for (const auto& one_data : data_list) {
// 提前停止程序运行
if (time(0) - start_time > 55) {
break;
}
// 处理代码
// process();
}
return 0;
}