Threads.cpp 160 Bytes
Newer Older
Nelson Phillips's avatar
Nelson Phillips committed
1 2 3 4 5 6
#include <iostream>
#include <thread>  
#include <unistd.h>
#include "Threads.h"

void Thread::Sleep(float s){
Nelson Phillips's avatar
Nelson Phillips committed
7
    int sec = int(s*130000); 
Nelson Phillips's avatar
Nelson Phillips committed
8 9
    usleep(sec); 
}