radv: Use os_localtime instead of localtime_r
Cross-platform abstraction that works with MSVC. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
This commit is contained in:
parent
fe67fe688a
commit
3fe62252e4
|
@ -669,7 +669,7 @@ radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_cmdbuf *cs)
|
||||||
char buf_time[128];
|
char buf_time[128];
|
||||||
|
|
||||||
time(&raw_time);
|
time(&raw_time);
|
||||||
timep = localtime_r(&raw_time, &result);
|
timep = os_localtime(&raw_time, &result);
|
||||||
strftime(buf_time, sizeof(buf_time), "%Y.%m.%d_%H.%M.%S", timep);
|
strftime(buf_time, sizeof(buf_time), "%Y.%m.%d_%H.%M.%S", timep);
|
||||||
|
|
||||||
snprintf(dump_dir, sizeof(dump_dir), "%s/"RADV_DUMP_DIR"_%d_%s",
|
snprintf(dump_dir, sizeof(dump_dir), "%s/"RADV_DUMP_DIR"_%d_%s",
|
||||||
|
|
|
@ -132,7 +132,7 @@ radv_sqtt_fill_header(struct sqtt_file_header *header)
|
||||||
header->chunk_offset = sizeof(*header);
|
header->chunk_offset = sizeof(*header);
|
||||||
|
|
||||||
time(&raw_time);
|
time(&raw_time);
|
||||||
timep = localtime_r(&raw_time, &result);
|
timep = os_localtime(&raw_time, &result);
|
||||||
|
|
||||||
header->second = timep->tm_sec;
|
header->second = timep->tm_sec;
|
||||||
header->minute = timep->tm_min;
|
header->minute = timep->tm_min;
|
||||||
|
|
Loading…
Reference in New Issue