summaryrefslogtreecommitdiffstats
path: root/win/tclWinTime.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-07 08:39:37 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-07 08:39:37 (GMT)
commit5b2b2aba5d8ab99e4cb03dc960f2695f0c0698a0 (patch)
tree659e01c5b151ea205fe9e93730d4a71de3977748 /win/tclWinTime.c
parent62575cdd32102c8c01521d61cefda93a4a26493b (diff)
parentefadd7170eafc8ffacab61f82cf3878cc7285ff1 (diff)
downloadtcl-5b2b2aba5d8ab99e4cb03dc960f2695f0c0698a0.zip
tcl-5b2b2aba5d8ab99e4cb03dc960f2695f0c0698a0.tar.gz
tcl-5b2b2aba5d8ab99e4cb03dc960f2695f0c0698a0.tar.bz2
Merge 8.7
Diffstat (limited to 'win/tclWinTime.c')
-rw-r--r--win/tclWinTime.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index 6640188..716b27e 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -233,7 +233,7 @@ TclpGetWideClicks(void)
/*
* The frequency of the performance counter is fixed at system boot and
- * is consistent across all processors. Therefore, the frequency need
+ * is consistent across all processors. Therefore, the frequency need
* only be queried upon application initialization.
*/
if (QueryPerformanceFrequency(&perfCounterFreq)) {
@@ -244,7 +244,7 @@ TclpGetWideClicks(void)
wideClick.perfCounter = 0;
wideClick.microsecsScale = 1;
}
-
+
wideClick.initialized = 1;
}
if (wideClick.perfCounter) {
@@ -265,7 +265,7 @@ TclpGetWideClicks(void)
*
* TclpWideClickInMicrosec --
*
- * This procedure return scale to convert wide click values from the
+ * This procedure return scale to convert wide click values from the
* TclpGetWideClicks native resolution to microsecond resolution
* and back.
*
@@ -304,7 +304,7 @@ TclpWideClickInMicrosec(void)
*----------------------------------------------------------------------
*/
-Tcl_WideInt
+Tcl_WideInt
TclpGetMicroseconds(void)
{
Tcl_WideInt usecSincePosixEpoch;
@@ -423,7 +423,7 @@ NativeCalc100NsTicks(
LONGLONG curCounterFreq,
LONGLONG curCounter
) {
- return fileTimeLastCall +
+ return fileTimeLastCall +
((curCounter - perfCounterLastCall) * 10000000 / curCounterFreq);
}
@@ -811,7 +811,7 @@ UpdateTimeEachSecond(void)
return;
}
QueryPerformanceCounter(&curPerfCounter);
-
+
lastFileTime.QuadPart = curFileTime.QuadPart;
/*
@@ -879,7 +879,7 @@ UpdateTimeEachSecond(void)
/* calculate new frequency and estimate drift to the next second */
vt1 = 20000000 + curFileTime.QuadPart;
driftFreq = (estFreq * 20000000 / (vt1 - vt0));
- /*
+ /*
* Avoid too large drifts (only half of the current difference),
* that allows also be more accurate (aspire to the smallest tdiff),
* so then we can prolong calibration interval by tdiff < 100000
@@ -887,13 +887,13 @@ UpdateTimeEachSecond(void)
driftFreq = timeInfo.curCounterFreq.QuadPart +
(driftFreq - timeInfo.curCounterFreq.QuadPart) / 2;
- /*
+ /*
* Average between estimated, 2 current and 5 drifted frequencies,
* (do the soft drifting as possible)
*/
estFreq = (estFreq + 2 * timeInfo.curCounterFreq.QuadPart + 5 * driftFreq) / 8;
}
-
+
/* Avoid too large discrepancy from nominal frequency */
if (estFreq > 1003*timeInfo.nominalFreq.QuadPart/1000) {
estFreq = 1003*timeInfo.nominalFreq.QuadPart/1000;
@@ -902,9 +902,9 @@ UpdateTimeEachSecond(void)
estFreq = 997*timeInfo.nominalFreq.QuadPart/1000;
vt0 = curFileTime.QuadPart;
} else if (vt0 != curFileTime.QuadPart) {
- /*
+ /*
* Be sure the clock ticks never backwards (avoid it by negative drifting)
- * just compare native time (in 100-ns) before and hereafter using
+ * just compare native time (in 100-ns) before and hereafter using
* new calibrated values) and do a small adjustment (short time freeze)
*/
LARGE_INTEGER newPerfCounter;