int buf_load(string filename);
void buf_save(int buf, string filename);
+// adding just 0.4 for race times so it rounds down in the .5 case (matching the timer display)
+// FIXME it doesn't round properly
#define TIME_TO_NTHS(t,n) floor((t) * (n) + 0.4)
string format_time(float seconds);
string mmsss(float t);
#define TIME_ENCODED_TOSTRING(n) mmssss(n)
#define RACE_RECORD "/race100record/"
#define CTS_RECORD "/cts100record/"
+#define CTF_RECORD "/ctf100record/"
#define TIME_ENCODE(t) TIME_TO_NTHS(t, TIME_FACTOR)
#define TIME_DECODE(n) ((n) / TIME_FACTOR)