#include <iostream>
#include "Windows.h"
using namespace std;
int main(){
int x = 0;
for (int i=0; i<100000; i++){ //pretend main loop
#pragma omp parallel for schedule(dynamic,50) reduction(+ : x)
for (int p=0; p<10000; p++){
x++;
}
cout << "X = " << x << "\nNow sleeping for 50ms.\n";
Sleep(50);
}
};