From 57db9bea3416e90b6ff2fcbd4bc42572014a46c3 Mon Sep 17 00:00:00 2001 From: Jonathan Westhues Date: Sun, 1 Jun 2008 01:46:02 -0800 Subject: [PATCH] Use a higher-res timer for GetMilliseconds(), and tweak some stuff. [git-p4: depot-paths = "//depot/solvespace/": change = 1765] --- sketch.cpp | 4 +++- system.cpp | 2 +- win32/w32main.cpp | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sketch.cpp b/sketch.cpp index a7211ed1..225e42c4 100644 --- a/sketch.cpp +++ b/sketch.cpp @@ -540,7 +540,9 @@ void Group::MakePolygons(void) { SMesh outm; ZERO(&outm); - if(type == DRAWING_3D || type == DRAWING_WORKPLANE) { + if(type == DRAWING_3D || type == DRAWING_WORKPLANE || + type == ROTATE || type == TRANSLATE) + { int i; for(i = 0; i < SS.entity.n; i++) { Entity *e = &(SS.entity.elem[i]); diff --git a/system.cpp b/system.cpp index 93a41abc..ee8b6f7a 100644 --- a/system.cpp +++ b/system.cpp @@ -146,7 +146,7 @@ void System::SolveBySubstitution(void) { } bool System::Tol(double v) { - return (fabs(v) < 0.01); + return (fabs(v) < 0.0001); } int System::GaussJordan(void) { diff --git a/win32/w32main.cpp b/win32/w32main.cpp index fa4ff272..36a62183 100644 --- a/win32/w32main.cpp +++ b/win32/w32main.cpp @@ -496,7 +496,11 @@ void PaintGraphics(void) SDWORD GetMilliseconds(void) { - return (SDWORD)GetTickCount(); + LARGE_INTEGER t, f; + QueryPerformanceCounter(&t); + QueryPerformanceFrequency(&f); + LONGLONG d = t.QuadPart/(f.QuadPart/1000); + return (SDWORD)d; } void InvalidateText(void)