mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-15 22:37:14 +02:00
Factored out time conversion (#23)
* time conversion * with comment * lround in slsDetectorCommand
This commit is contained in:

committed by
Dhanya Thattil

parent
877bdb8979
commit
f1a1391866
@ -3,6 +3,7 @@
|
||||
#include "string_utils.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cmath>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
@ -4496,10 +4497,9 @@ std::string slsDetectorCommand::cmdTimer(int narg, char *args[], int action, int
|
||||
if (index == ACQUISITION_TIME || index == SUBFRAME_ACQUISITION_TIME ||
|
||||
index == FRAME_PERIOD || index == DELAY_AFTER_TRIGGER ||
|
||||
index == SUBFRAME_DEADTIME || index == STORAGE_CELL_DELAY) {
|
||||
// +0.5 for precision of eg.0.0000325
|
||||
t = (val * 1E9 + 0.5);
|
||||
t = lround(val * 1E9);
|
||||
} else
|
||||
t = (int64_t)val;
|
||||
t = static_cast<int64_t>(val);
|
||||
}
|
||||
|
||||
myDet->setOnline(ONLINE_FLAG, detPos);
|
||||
|
Reference in New Issue
Block a user