/* util.c by Michael Thorpe 2017-10-09 */ #include #include #include #include #include #include "runner.h" void errmsg(const char *msg) { /* FIXME: We need a better way to display this */ move(cliframe.y,cliframe.x); printw("ERROR: %s",msg); clrtoeol(); refresh(); usleep(500000); move(cliframe.y,cliframe.x); clrtoeol(); refresh(); } double gettime() { struct timeval tv; static unsigned long oldsec=0; if(gettimeofday(&tv,0)) { perror("gettimeofday"); exit(-1); } while(tv.tv_sec