/*!
  \file
  \brief 待機関数

  \author Satofumi KAMIMURA

  $Id: system_delay.cpp 1066 2009-06-23 14:05:40Z satofumi $
*/

#include "system_delay.h"
#include <QThread>


namespace
{
  class DelayThread : public QThread
  {
    int delay_msec_;

  public:
    DelayThread(int msec) : delay_msec_(msec)
    {
    }


    void run(void)
    {
      QThread::msleep(delay_msec_);
    }
  };
}


void qrk::system_delay(int msec)
{
  DelayThread delay_thread(msec);
  delay_thread.run();
  delay_thread.wait();
}
