2013-09-07から1日間の記事一覧
C/C++プリプロセッサを利用した環境依存コードの切り替え。通常の#ifdef〜#endif方式で切り替えるより見た目が綺麗? unsigned int get_tick_msec() { ENV_windows( return GetTickCount(); ) ENV_linux( struct timespec ts; clock_gettime(CLOCK_MONOTONIC…
C/C++プリプロセッサを利用した環境依存コードの切り替え。通常の#ifdef〜#endif方式で切り替えるより見た目が綺麗? unsigned int get_tick_msec() { ENV_windows( return GetTickCount(); ) ENV_linux( struct timespec ts; clock_gettime(CLOCK_MONOTONIC…