Skip to content

Commit

Permalink
Updated the get current time function
Browse files Browse the repository at this point in the history
  • Loading branch information
ron4fun committed Sep 13, 2019
1 parent cfe63fa commit 918d017
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IntXLib/src/PcgRandom/PcgRandomMinimal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
typedef unsigned long long UInt64;
typedef unsigned int UInt32;

#include <time.h>
#include <chrono>
#include <cstdlib>

using namespace std;
Expand Down Expand Up @@ -50,7 +50,7 @@ class Pcg

static UInt64 GetInitState(UInt64 &initSeq)
{
UInt64 result = time(0);
UInt64 result = chrono::duration_cast<chrono::milliseconds>(chrono::system_clock::now().time_since_epoch()).count();

initSeq = GetInitSeq(result) * (long long)(1000000);

Expand Down

0 comments on commit 918d017

Please sign in to comment.