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

  \author Satofumi KAMIMURA

  $Id: stopWatchSample.cpp 1247 2009-08-25 21:13:37Z satofumi $
*/

#include "StopWatch.h"
#include "delay.h"

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;
}
