mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 10:04:39 +01:00
Api (#48)
* WIP * WIP * WIP * cleaned up multi * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * split up python module * WIP * WIP * WIP * WIP * WIP * ok * fixed bugs from rebase * WIP * fixed broken test * WIP * fixed python * WIP * sphinx help * including new commands * docs * WIP * WIP * more tests * added missing public header * WIP
This commit is contained in:
19
slsSupportLib/include/TimeHelper.h
Normal file
19
slsSupportLib/include/TimeHelper.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include <chrono>
|
||||
|
||||
#include "TypeTraits.h"
|
||||
namespace sls {
|
||||
namespace time {
|
||||
using ns = std::chrono::nanoseconds;
|
||||
using us = std::chrono::microseconds;
|
||||
using ms = std::chrono::milliseconds;
|
||||
using s = std::chrono::seconds;
|
||||
|
||||
//Absolute value of std::chrono::duration
|
||||
template <class Rep, class Period>
|
||||
constexpr std::chrono::duration<Rep, Period> abs(std::chrono::duration<Rep, Period> d) {
|
||||
return d >= d.zero() ? d : -d;
|
||||
}
|
||||
|
||||
} // namespace time
|
||||
} // namespace sls
|
||||
Reference in New Issue
Block a user