vim-patch:7.4.1285

Problem:    Cannot measure elapsed time.
Solution:   Add reltimefloat().

79c2c881bb

Applied manually. None of the ifdef's applies anymore, and proftime_T was
changed into an uint64_T, so the function profile_float to convert proftime_T to
float is not needed in nvim.
This commit is contained in:
KillTheMule
2016-04-16 17:15:51 +02:00
parent b02ba11cb1
commit dc91397463
2 changed files with 17 additions and 1 deletions

View File

@@ -6850,6 +6850,7 @@ static struct fst {
{ "range", 1, 3, f_range },
{ "readfile", 1, 3, f_readfile },
{ "reltime", 0, 2, f_reltime },
{ "reltimefloat", 1, 1, f_reltimefloat },
{ "reltimestr", 1, 1, f_reltimestr },
{ "remove", 2, 3, f_remove },
{ "rename", 2, 2, f_rename },
@@ -15296,6 +15297,21 @@ static void f_uniq(typval_T *argvars, typval_T *rettv)
do_sort_uniq(argvars, rettv, false);
}
//
// "reltimefloat()" function
//
static void f_reltimefloat(typval_T *argvars , typval_T *rettv)
FUNC_ATTR_NONNULL_ALL
{
proftime_T tm;
rettv->v_type = VAR_FLOAT;
rettv->vval.v_float = 0;
if (list2proftime(&argvars[0], &tm) == OK) {
rettv->vval.v_float = ((float_T)tm) / 1000000000;
}
}
/*
* "soundfold({word})" function
*/

View File

@@ -393,7 +393,7 @@ static int included_patches[] = {
// 1288 NA
// 1287 NA
// 1286 NA
// 1285,
1285,
1284,
// 1283 NA
1282,