Author: Dann Corbit
Date: 20:42:38 01/17/06
Go up one level in this thread
On January 17, 2006 at 23:40:07, Joshua Shriver wrote: >When doing time controls for evaluation,what's the most efficient way of doing >it? > >Right now at the start of the game I just do the typical check of x seconds >since Jan 1 1970, and keep polling the time. > >This seems to eat up a lot of CPU time that could be used for the evaluation >itself. > >My engine is implemented in C. Was wondering can you do alarm signal in C like >you can in Perl? If so then you can just have the OS send a alarm signal when x >seconds have passed. In Perl this is really efficient and saves a lot of CPU >cycles. You can use events or callbacks. In Windows, there are a limited number of timers and so timer create may fail. In Unix, alarm is fine (but not portable to Windows).
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.