mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 13:08:33 +00:00
startuptime: implement on top of profiling fns
Reuse the profiling functions to implement the startuptime functions. Decreases our dependency on `gettimeofday()` and thus gets us a little bit closer to a clean port to Windows.
This commit is contained in:

committed by
Justin M. Keyes

parent
a001510382
commit
47815fc6f4
@@ -2262,8 +2262,8 @@ do_source (
|
||||
int save_debug_break_level = debug_break_level;
|
||||
scriptitem_T *si = NULL;
|
||||
#ifdef STARTUPTIME
|
||||
struct timeval tv_rel;
|
||||
struct timeval tv_start;
|
||||
proftime_T tv_rel;
|
||||
proftime_T tv_start;
|
||||
#endif
|
||||
proftime_T wait_start;
|
||||
|
||||
@@ -2494,7 +2494,7 @@ do_source (
|
||||
if (time_fd != NULL) {
|
||||
vim_snprintf((char *)IObuff, IOSIZE, "sourcing %s", fname);
|
||||
time_msg((char *)IObuff, &tv_start);
|
||||
time_pop(&tv_rel);
|
||||
time_pop(tv_rel);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user