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:
Nicolas Hillegeer
2014-07-17 13:54:41 +02:00
committed by Justin M. Keyes
parent a001510382
commit 47815fc6f4
3 changed files with 58 additions and 81 deletions

View File

@@ -1472,7 +1472,7 @@ static void init_startuptime(mparm_T *paramp)
for (i = 1; i < paramp->argc; ++i) {
if (STRICMP(paramp->argv[i], "--startuptime") == 0 && i + 1 < paramp->argc) {
time_fd = mch_fopen(paramp->argv[i + 1], "a");
TIME_MSG("--- VIM STARTING ---");
time_start("--- VIM STARTING ---");
break;
}
}