mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 22:40:02 +02:00

* 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
19 lines
477 B
C++
19 lines
477 B
C++
#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
|