Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions stl/src/xtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#include <time.h>
#include <xtimec.h>

#define NSEC_PER_SEC 1000000000L
#define NSEC_PER_MSEC 1000000L
#define NSEC_PER_USEC 1000L
#define MSEC_PER_SEC 1000
constexpr long NSEC_PER_SEC = 1000000000L;
constexpr long NSEC_PER_MSEC = 1000000L;
constexpr long NSEC_PER_USEC = 1000L;
constexpr int MSEC_PER_SEC = 1000;

static void xtime_normalize(xtime* xt) { // adjust so that 0 <= nsec < 1 000 000 000
while (xt->nsec < 0) { // normalize target time
Expand Down Expand Up @@ -43,10 +43,10 @@ static xtime xtime_diff(const xtime* xt,
}


#define EPOCH 0x19DB1DED53E8000i64

#define NSEC100_PER_SEC (NSEC_PER_SEC / 100)
#define NSEC100_PER_MSEC (NSEC_PER_MSEC / 100)
constexpr long long EPOCH = 0x19DB1DED53E8000i64;
constexpr long NSEC100_PER_SEC = NSEC_PER_SEC / 100;
constexpr long NSEC100_PER_MSEC = NSEC_PER_MSEC / 100;

_EXTERN_C

Expand Down