I'm trying to understand what I'm seeing with the msec timing on win32 (cygwin). Inside the debugger, I'm seeing:
(gdb) p tm_delta $1 = {u = {LowPart = 2434313347, HighPart = 896}, {LowPart = 2434313347, HighPart = 896}, QuadPart = 3850725010563} (gdb) n 180 n1 = tm_delta.HighPart; (gdb) 181 n2 = tm_delta.LowPart; (gdb) p n1 $4 = 895 (gdb) p n2 $2 = -1860653949 And in Vim: :echo reltime() [895, -162159878] So is this a bug? Internally, the low part of the proftime_T structure is positive, and it shows up externally as negative. I checked, and as far as I can tell, the LowPart is a win32 LARGE_INTEGER, which is 8 bytes, which is trying to be stuffed into a "long" which is 4 bytes. I think the right answer is a "double", but I'm not real sure about how win32 stuff works (since WhyTF has it defined a special LARGE_INTEGER type?). I don't know about unix, but it might have the same problem if tv_usec is a double. P.S. "profile_cmp()" is returning an "int" instead of a "double", so it's wonky also.