添加获取时间戳函数用于测试性能

This commit is contained in:
2025-08-19 00:48:10 +08:00
parent 36941aef25
commit bb61bfcd2e
3 changed files with 11 additions and 0 deletions

View File

@@ -197,8 +197,11 @@ void set_wallpaper_by_index(uint32_t index) {
wallpaper_config, monitors, index, screen_size->width, screen_size->height);
if (wallpaper) {
double start = get_time();
set_wallpaper(wallpaper);
double end = get_time();
free(wallpaper);
printf("set wallpaper cost: %fs\n", end - start);
}
free(screen_size);