PSQt/src/TestThread1.cpp

Go to the documentation of this file.
00001 //---------------------------------------------------------------------
00002 // File and Version Information:
00003 //   $Id: TestThread1.cpp 9841 2015-03-26 18:35:44Z dubrovin@SLAC.STANFORD.EDU $
00004 //
00005 // Author: Mikhail S. Dubrovin
00006 //---------------------------------------------------------------------
00007 
00008 
00009 #include "PSQt/TestThread1.h"
00010 #include <iostream>
00011 using  namespace std;
00012 
00013 namespace PSQt {
00014 
00015 //--------------------------
00016 
00017 TestThread1::TestThread1(QObject* parent)
00018   : QThread(parent)
00019 {
00020   static uint counter = 0; counter++;
00021   m_thread = counter;
00022 }
00023 
00024 //--------------------------
00025 
00026 void TestThread1::run()
00027 {
00028   for(int i=0; i<1000000; i++){
00029     cout << " Thread:" << m_thread << " loop i=" << i << endl;
00030     sleep(1); // delay in in ms ?
00031   }  
00032 }
00033 
00034 //--------------------------
00035 } // namespace PSQt
00036 //--------------------------

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7