mruby-sleep: combine variable declaration with initialization

This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-10-26 20:01:30 +09:00
parent c1653debb1
commit 5d62acc3b8
+1 -2
View File
@@ -115,7 +115,6 @@ f_usleep(mrb_state *mrb, mrb_value self)
#else
struct timeval st_tm,ed_tm;
#endif
time_t slp_tm;
#ifdef _WIN32
GetSystemTimeAsFileTime(&st_ft);
@@ -143,7 +142,7 @@ f_usleep(mrb_state *mrb, mrb_value self)
ed_time <<=32;
ed_time |= ed_ft.dwLowDateTime;
slp_tm = (ed_time - st_time) / 10;
time_t slp_tm = (ed_time - st_time) / 10;
#else
gettimeofday(&ed_tm, NULL);