mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Remove unused beast::currentTimeMillis()
This commit is contained in:
@@ -1399,11 +1399,6 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClInclude Include="..\..\src\ripple\beast\core\SystemStats.h">
|
<ClInclude Include="..\..\src\ripple\beast\core\SystemStats.h">
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClCompile Include="..\..\src\ripple\beast\core\Time.cpp">
|
|
||||||
<ExcludedFromBuild>True</ExcludedFromBuild>
|
|
||||||
</ClCompile>
|
|
||||||
<ClInclude Include="..\..\src\ripple\beast\core\Time.h">
|
|
||||||
</ClInclude>
|
|
||||||
<ClCompile Include="..\..\src\ripple\beast\core\WaitableEvent.cpp">
|
<ClCompile Include="..\..\src\ripple\beast\core\WaitableEvent.cpp">
|
||||||
<ExcludedFromBuild>True</ExcludedFromBuild>
|
<ExcludedFromBuild>True</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|||||||
@@ -1869,12 +1869,6 @@
|
|||||||
<ClInclude Include="..\..\src\ripple\beast\core\SystemStats.h">
|
<ClInclude Include="..\..\src\ripple\beast\core\SystemStats.h">
|
||||||
<Filter>ripple\beast\core</Filter>
|
<Filter>ripple\beast\core</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClCompile Include="..\..\src\ripple\beast\core\Time.cpp">
|
|
||||||
<Filter>ripple\beast\core</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClInclude Include="..\..\src\ripple\beast\core\Time.h">
|
|
||||||
<Filter>ripple\beast\core</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClCompile Include="..\..\src\ripple\beast\core\WaitableEvent.cpp">
|
<ClCompile Include="..\..\src\ripple\beast\core\WaitableEvent.cpp">
|
||||||
<Filter>ripple\beast\core</Filter>
|
<Filter>ripple\beast\core</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|||||||
@@ -38,7 +38,6 @@
|
|||||||
#include <ripple/protocol/BuildInfo.h>
|
#include <ripple/protocol/BuildInfo.h>
|
||||||
#include <ripple/beast/clock/basic_seconds_clock.h>
|
#include <ripple/beast/clock/basic_seconds_clock.h>
|
||||||
#include <ripple/beast/core/CurrentThreadName.h>
|
#include <ripple/beast/core/CurrentThreadName.h>
|
||||||
#include <ripple/beast/core/Time.h>
|
|
||||||
#include <ripple/beast/utility/Debug.h>
|
#include <ripple/beast/utility/Debug.h>
|
||||||
|
|
||||||
#include <beast/unit_test/dstream.hpp>
|
#include <beast/unit_test/dstream.hpp>
|
||||||
@@ -57,6 +56,10 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/timeb.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if BOOST_VERSION >= 106400
|
#if BOOST_VERSION >= 106400
|
||||||
#define HAS_BOOST_PROCESS 1
|
#define HAS_BOOST_PROCESS 1
|
||||||
@@ -588,11 +591,22 @@ int run (int argc, char** argv)
|
|||||||
//
|
//
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
// Workaround for Boost.Context / Boost.Coroutine
|
|
||||||
// https://svn.boost.org/trac/boost/ticket/10657
|
|
||||||
(void)beast::currentTimeMillis();
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
{
|
||||||
|
// Work around for https://svn.boost.org/trac/boost/ticket/10657
|
||||||
|
// Reported against boost version 1.56.0. If an application's
|
||||||
|
// first call to GetTimeZoneInformation is from a coroutine, an
|
||||||
|
// unhandled exception is generated. A workaround is to call
|
||||||
|
// GetTimeZoneInformation at least once before launching any
|
||||||
|
// coroutines. At the time of this writing the _ftime call is
|
||||||
|
// used to initialize the timezone information.
|
||||||
|
struct _timeb t;
|
||||||
|
#ifdef _INC_TIME_INL
|
||||||
|
_ftime_s (&t);
|
||||||
|
#else
|
||||||
|
_ftime (&t);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
ripple::sha512_deprecatedMSVCWorkaround();
|
ripple::sha512_deprecatedMSVCWorkaround();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
|
||||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
|
||||||
|
|
||||||
Portions of this file are from JUCE.
|
|
||||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
|
||||||
Please visit http://www.juce.com
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
||||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
//==============================================================================
|
|
||||||
|
|
||||||
#include <ripple/beast/core/Time.h>
|
|
||||||
|
|
||||||
namespace beast
|
|
||||||
{
|
|
||||||
|
|
||||||
std::int64_t currentTimeMillis()
|
|
||||||
{
|
|
||||||
#if BEAST_WINDOWS
|
|
||||||
struct _timeb t;
|
|
||||||
#ifdef _INC_TIME_INL
|
|
||||||
_ftime_s (&t);
|
|
||||||
#else
|
|
||||||
_ftime (&t);
|
|
||||||
#endif
|
|
||||||
return ((std::int64_t) t.time) * 1000 + t.millitm;
|
|
||||||
#else
|
|
||||||
struct timeval tv;
|
|
||||||
gettimeofday (&tv, nullptr);
|
|
||||||
return ((std::int64_t) tv.tv_sec) * 1000 + tv.tv_usec / 1000;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
} // beast
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
|
||||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
|
||||||
|
|
||||||
Portions of this file are from JUCE.
|
|
||||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
|
||||||
Please visit http://www.juce.com
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
||||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
//==============================================================================
|
|
||||||
|
|
||||||
#ifndef BEAST_MODULE_CORE_TIME_TIME_H_INCLUDED
|
|
||||||
#define BEAST_MODULE_CORE_TIME_TIME_H_INCLUDED
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
namespace beast {
|
|
||||||
|
|
||||||
std::int64_t currentTimeMillis();
|
|
||||||
|
|
||||||
} // beast
|
|
||||||
|
|
||||||
#endif // BEAST_TIME_H_INCLUDED
|
|
||||||
@@ -193,7 +193,6 @@
|
|||||||
#include <ripple/beast/core/CurrentThreadName.cpp>
|
#include <ripple/beast/core/CurrentThreadName.cpp>
|
||||||
#include <ripple/beast/core/SemanticVersion.cpp>
|
#include <ripple/beast/core/SemanticVersion.cpp>
|
||||||
#include <ripple/beast/core/SystemStats.cpp>
|
#include <ripple/beast/core/SystemStats.cpp>
|
||||||
#include <ripple/beast/core/Time.cpp>
|
|
||||||
#include <ripple/beast/core/WaitableEvent.cpp>
|
#include <ripple/beast/core/WaitableEvent.cpp>
|
||||||
|
|
||||||
#ifdef _CRTDBG_MAP_ALLOC
|
#ifdef _CRTDBG_MAP_ALLOC
|
||||||
|
|||||||
Reference in New Issue
Block a user