Author: Tom Kerrigan
Date: 00:27:24 01/14/00
Go up one level in this thread
I just ran the program below with Visual C++ 5.0 and Windows 98. It runs for 10
seconds and counts how many times GetTickCount() changes. In 10 seconds, it
changed 2001 times, indicating that it changes every 5 ms. This is fine and
good, but it does not explain how I can get the following analysis, also using
GetTickCount():
position 002
Position: 8/7p/5k2/5p2/p1p2P2/Pr1pPK2/1P1R3P/8 b - - 0 1
Solution(s): Rxb2
ply time nodes score pv
1. 0.008 24 0.20 Ke6
2+ 0.013 156 0.70 Ke6 e4
2. 0.015 232 0.94 c3 bxc3 ...
3. 0.017 341 0.94 c3 bxc3 ...
4. 0.023 868 0.91 c3 bxc3 ...
5. 0.029 2024 0.92 c3 bxc3 ...
6. 0.050 5822 0.82 c3 bxc3 ...
7. 0.073 12050 0.93 c3 bxc3 ...
-Tom
/* begin GetTickCount() test program */
#include <stdio.h>
#include <windows.h>
void main()
{
int t, stop, old, ticks = 0;
old = GetTickCount();
stop = old + 10000;
for (;;) {
t = GetTickCount();
if (t != old) {
++ticks;
if (t > stop)
break;
old = t;
}
}
printf("ticks: %d\n", ticks);
getc(stdin);
}
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.