Commit 72522749 authored by Tobias Bjerg's avatar Tobias Bjerg
Browse files

SLEEP and Scheduler

parent 775ceedd
......@@ -181,7 +181,8 @@ int driver_obs_obsdaq::get(data_obs_vector* data) {
send("#PP10000500");
usleep(200e3);
send("#PP00000000");
usleep(2e6);
int res=sleep(5);
std::cerr << "PROBLEM WIH SLEEP: " << res << std::endl;
// Ask for latest values.
send("#A");
......@@ -314,9 +315,9 @@ int driver_obs_obsdaq::freerun(double freq) {
// Channel synchronization
send("#PP10000500");
usleep(2e5);
usleep(200e3);
send("#PP00000000");
usleep(2e5);
usleep(2e6);
// Flush
usleep(1e6);
......
// C Headers
#include <stdio.h>
#include <iostream>
#include <sched.h>
#include <sys/resource.h>
#include <sys/time.h>
//#include <thread>
//#include <vector>
......@@ -19,6 +22,15 @@
int main(int argc, char* argv[]) {
/*
struct sched_param sp = { .sched_priority = 10 };
if (!sched_setscheduler(0,SCHED_FIFO,&sp)) {
std::cerr << "High priority FIFO scheduler FAILED for OBSDAQ_Logger." << std::endl;
sched_setscheduler(0,SCHED_BATCH,&sp)
setpriority(PRIO_PROCESS,0,-20);
}
*/
/*
std::string parfile;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment