Move NowMs() to EmberDefines

This prevents a circular reference where Isaac.h requires this method, but Utils.h includes Isaac.h
This commit is contained in:
Simon Detheridge
2015-04-13 12:12:38 +01:00
parent e8bbfdd2d4
commit 3f5db01a06
2 changed files with 8 additions and 7 deletions

View File

@ -77,6 +77,14 @@ namespace EmberNs
#define EMPTYFIELD -9999
typedef std::chrono::high_resolution_clock Clock;
/// <summary>
/// Thin wrapper around getting the current time in milliseconds.
/// </summary>
static inline size_t NowMs()
{
return duration_cast<milliseconds>(Clock::now().time_since_epoch()).count();
}
#ifndef byte
typedef unsigned char byte;
#endif