Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/05/2013, 18:27
vitro012
 
Fecha de Ingreso: marzo-2009
Mensajes: 133
Antigüedad: 15 años, 1 mes
Puntos: 4
Respuesta: Simular semaforos en C++

haz intentado con la funcion delay?

#include<time.h>
#include<iostream>
using namespace std;

void delay(int secs) {
for(int i = (time(NULL) + secs); time(NULL) != i; time(NULL));
}

int main()
{
int sec;
cout << "Segundos a pausar?: "; cin >> sec;
delay(sec);
}