Skip to content

Commit

Permalink
8263136: C4530 was reported from VS 2019 at access bridge
Browse files Browse the repository at this point in the history
Reviewed-by: stuefe, serb
  • Loading branch information
YaSuenag committed Mar 13, 2021
1 parent a528771 commit d339320
Showing 1 changed file with 8 additions and 7 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -32,7 +32,6 @@
#include <stdio.h>
#include <windows.h>
#include <cstdlib>
#include <chrono>
#include <cstring>

#ifdef __cplusplus
Expand Down Expand Up @@ -72,11 +71,13 @@ void finalizeFileLogger() {
}
}

auto getTimeStamp() -> long long {
using namespace std::chrono;
auto timeNow = duration_cast<milliseconds>(steady_clock::now().time_since_epoch());

return timeNow.count();
unsigned long long getTimeStamp() {
FILETIME ft;
ULARGE_INTEGER uli;
GetSystemTimeAsFileTime(&ft);
uli.LowPart = ft.dwLowDateTime;
uli.HighPart = ft.dwHighDateTime;
return (uli.QuadPart / 10000ULL) - 11644473600000ULL; // Rebase Epoch from 1601 to 1970
}

/**
Expand Down

1 comment on commit d339320

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.