Classes | Functions
test_thread.cxx File Reference
#include <iostream>
#include <sstream>
#include <chrono>
#include <thread>

Go to the source code of this file.

Classes

struct  Fun
 

Functions

void msleep (int msec)
 
int main ()
 

Function Documentation

int main ( void  )

Definition at line 31 of file test_thread.cxx.

31  {
32 
33  Fun f1(1);
34 
35  std::thread t1(f1,42,true);
36  std::thread t2(f1,69,false);
37  t1.join();
38  t2.join();
39 
40  return 0;
41 }
EmPhysicsFactory f1
void msleep ( int  msec)

Definition at line 5 of file test_thread.cxx.

6 {
7  std::this_thread::sleep_for(std::chrono::milliseconds(msec));
8 }
millisecond milliseconds
Alias for common language habits.
Definition: spacetime.h:100