1 #ifndef ZZGO_TIMEINFO_H
2 #define ZZGO_TIMEINFO_H
4 /* Time-keeping information about time to spend on the next move and/or
7 /* Note that some ways of specifying time (TD_GAMES) may not make sense
14 /* For how long we can spend the time? */
16 TT_MOVE
, // Time for the next move.
17 TT_TOTAL
, // Time for the rest of the game.
19 /* How are we counting the time? */
21 TD_GAMES
, // Fixed number of simulations to perform.
22 TD_WALLTIME
, // Wall time to spend performing simulations.
25 int games
; // TD_GAMES
26 struct timespec walltime
; // TD_WALLTIME
30 /* Parse time information provided in custom format:
31 * =NUM - fixed number of simulations per move
32 * NUM - number of seconds to spend per move
33 * _NUM - number of seconds to spend per game
35 * Returns false on parse error. */
36 bool time_parse(struct time_info
*ti
, char *s
);