mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 04:47:14 +02:00
small changes from the meeting
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@9 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
@ -8,6 +8,9 @@
|
||||
#ifndef QDEFS_H
|
||||
#define QDEFS_H
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class qDefs
|
||||
{
|
||||
public:
|
||||
@ -32,18 +35,18 @@ public:
|
||||
* @param value time
|
||||
* returns time value in ns
|
||||
*/
|
||||
static int64_t get64bTime(timeUnit unit, double value){
|
||||
int64_t value64=value;
|
||||
static float getNSTime(timeUnit unit, float value){
|
||||
float valueNS=value;
|
||||
switch(unit){
|
||||
case HOURS: value64*=60;
|
||||
case MINUTES: value64*=60;
|
||||
case SECONDS: value64*=1000;
|
||||
case MILLISECONDS: value64*=1000;
|
||||
case MICROSECONDS: value64*=1000;
|
||||
case HOURS: valueNS*=60;
|
||||
case MINUTES: valueNS*=60;
|
||||
case SECONDS: valueNS*=1000;
|
||||
case MILLISECONDS: valueNS*=1000;
|
||||
case MICROSECONDS: valueNS*=1000;
|
||||
case NANOSECONDS:
|
||||
default:;
|
||||
}
|
||||
return value64;
|
||||
return valueNS;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user