55 const struct city *pcity,
const char *msg, ...)
60 char aibuf[500] =
"\0";
64 fc_snprintf(buffer,
sizeof(buffer),
"%s %s(%d,%d) (s%d) {%s} ",
89 const struct unit *
punit,
const char *msg, ...)
95 char aibuf[500] =
"\0";
106 "%s %s(%d) %s (%d,%d)->(%d,%d){%s} ",
131 static int turn = -1;
163#define AILOG_OUT(text, which) \
164 fc_snprintf(buf, sizeof(buf), " %s: %g sec turn, %g sec game", text, \
165 timer_read_seconds(aitimer[which][0]), \
166 timer_read_seconds(aitimer[which][1])); \
167 log_test("%s", buf); \
168 notify_conn(NULL, NULL, E_AI_DEBUG, ftc_log, "%s", buf);
170 log_test(
" --- AI timing results ---");
174#define AILOG_OUT(text, which) \
175 fc_snprintf(buf, sizeof(buf), " %s: %g sec turn, %g sec game", text, \
176 timer_read_seconds(aitimer[which][0]), \
177 timer_read_seconds(aitimer[which][1])); \
178 notify_conn(NULL, NULL, E_AI_DEBUG, ftc_log, "%s", buf);
183 " --- AI timing results ---");
#define CALL_PLR_AI_FUNC(_func, _player,...)
const char * city_name_get(const struct city *pcity)
static citizens city_size_get(const struct city *pcity)
#define city_owner(_pcity_)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
const struct ft_color ftc_log
void do_log(const char *file, const char *function, int line, bool print_from_where, enum log_level level, const char *message,...)
#define fc_assert(condition)
#define index_to_map_pos(pmap_x, pmap_y, mindex)
const char * nation_rule_name(const struct nation_type *pnation)
struct nation_type * nation_of_unit(const struct unit *punit)
struct nation_type * nation_of_city(const struct city *pcity)
void notify_conn(struct conn_list *dest, const struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
struct setting_list * level[OLEVELS_NUM]
void timing_log_init(void)
void real_city_log(const char *file, const char *function, int line, enum log_level level, bool notify, const struct city *pcity, const char *msg,...)
static struct timer * aitimer[AIT_LAST][2]
static int recursion[AIT_LAST]
void real_unit_log(const char *file, const char *function, int line, enum log_level level, bool notify, const struct unit *punit, const char *msg,...)
void timing_log_free(void)
void timing_results_real(void)
#define AILOG_OUT(text, which)
void timing_log_real(enum ai_timer timer, enum ai_timer_activity activity)
struct packet_game_info info
enum unit_activity activity
int fc_snprintf(char *str, size_t n, const char *format,...)
int cat_snprintf(char *str, size_t n, const char *format,...)
int fc_vsnprintf(char *str, size_t n, const char *format, va_list ap)
void timer_clear(struct timer *t)
void timer_destroy(struct timer *t)
void timer_start(struct timer *t)
void timer_stop(struct timer *t)
struct timer * timer_new(enum timer_timetype type, enum timer_use use, const char *name)
const char * get_activity_text(enum unit_activity activity)
const char * unit_rule_name(const struct unit *punit)