mirror of
https://github.com/vim/vim.git
synced 2025-09-07 22:03:36 -04:00
patch 9.0.1567: profiler calculation may be wrong on 32 bit builds
Problem: Profiler calculation may be wrong on 32 bit builds. Solution: Use 64 bit variable if possible. (Isao Sato, closes #12412)
This commit is contained in:
parent
74ccbb1f7d
commit
d13c254d10
@ -123,10 +123,11 @@ profile_setlimit(long msec, proftime_T *tm)
|
|||||||
QueryPerformanceFrequency(&fr);
|
QueryPerformanceFrequency(&fr);
|
||||||
tm->QuadPart += (LONGLONG)((double)msec / 1000.0 * (double)fr.QuadPart);
|
tm->QuadPart += (LONGLONG)((double)msec / 1000.0 * (double)fr.QuadPart);
|
||||||
# else
|
# else
|
||||||
long fsec;
|
varnumber_T fsec; // this should be 64 bit if possible
|
||||||
|
|
||||||
PROF_GET_TIME(tm);
|
PROF_GET_TIME(tm);
|
||||||
fsec = (long)tm->tv_fsec + (long)msec * (TV_FSEC_SEC / 1000);
|
fsec = (varnumber_T)tm->tv_fsec
|
||||||
|
+ (varnumber_T)msec * (varnumber_T)(TV_FSEC_SEC / 1000);
|
||||||
tm->tv_fsec = fsec % (long)TV_FSEC_SEC;
|
tm->tv_fsec = fsec % (long)TV_FSEC_SEC;
|
||||||
tm->tv_sec += fsec / (long)TV_FSEC_SEC;
|
tm->tv_sec += fsec / (long)TV_FSEC_SEC;
|
||||||
# endif
|
# endif
|
||||||
|
@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1567,
|
||||||
/**/
|
/**/
|
||||||
1566,
|
1566,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user