Cleanup: use BLI_time_ prefix for time functions

Also use the term "now" instead of "check" for clarity.
This commit is contained in:
Campbell Barton
2024-02-15 13:15:56 +11:00
parent e6c919830c
commit 5c87dfd269
90 changed files with 250 additions and 252 deletions

View File

@@ -128,10 +128,10 @@ void bpy_context_set(bContext *C, PyGILState_STATE *gilstate)
#ifdef TIME_PY_RUN
if (bpy_timer_count == 0) {
/* Record time from the beginning. */
bpy_timer = BLI_check_seconds_timer();
bpy_timer = BLI_time_now_seconds();
bpy_timer_run = bpy_timer_run_tot = 0.0;
}
bpy_timer_run = BLI_check_seconds_timer();
bpy_timer_run = BLI_time_now_seconds();
bpy_timer_count++;
#endif
@@ -157,7 +157,7 @@ void bpy_context_clear(bContext * /*C*/, const PyGILState_STATE *gilstate)
#endif
#ifdef TIME_PY_RUN
bpy_timer_run_tot += BLI_check_seconds_timer() - bpy_timer_run;
bpy_timer_run_tot += BLI_time_now_seconds() - bpy_timer_run;
bpy_timer_count++;
#endif
}
@@ -593,7 +593,7 @@ void BPY_python_end(const bool do_python_exit)
#ifdef TIME_PY_RUN
/* Measure time since Python started. */
bpy_timer = BLI_check_seconds_timer() - bpy_timer;
bpy_timer = BLI_time_now_seconds() - bpy_timer;
printf("*bpy stats* - ");
printf("tot exec: %d, ", bpy_timer_count);