/*!
  \file
  \brief StopWatch クラスの動作サンプル

  \author Satofumi KAMIMURA

  $Id: stopWatchSample.cpp 1474 2009-11-01 05:33:08Z satofumi $
*/

#include "StopWatch.h"
#include "delay.h"
#include <cstdio>

using namespace qrk;


int main(int argc, char *argv[])
{
  static_cast<void>(argc);
  static_cast<void>(argv);

  StopWatch timer;

  timer.start();

  for (int i = 0; i < 2; ++i) {
    getchar();
    timer.pause();
    printf("%d\n", timer.ticks());
    delay(10);
    printf("%d\n", timer.ticks());

    getchar();
    printf("%d\n", timer.ticks());
    timer.resume();
    printf("%d\n", timer.ticks());
    delay(10);
    printf("%d\n", timer.ticks());
  }

  return 0;
}
