Avoid warning about unused variable in wxGetUTCTimeMillis() in wxMSW.
Put the declaration of the variable only used under Unix inside the corresponding "#if" branch. See #14459. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -292,8 +292,6 @@ wxLongLong wxGetUTCTimeUSec()
|
|||||||
// Get local time as milliseconds since 00:00:00, Jan 1st 1970
|
// Get local time as milliseconds since 00:00:00, Jan 1st 1970
|
||||||
wxLongLong wxGetUTCTimeMillis()
|
wxLongLong wxGetUTCTimeMillis()
|
||||||
{
|
{
|
||||||
wxLongLong val = MILLISECONDS_PER_SECOND;
|
|
||||||
|
|
||||||
// If possible, use a function which avoids conversions from
|
// If possible, use a function which avoids conversions from
|
||||||
// broken-up time structures to milliseconds
|
// broken-up time structures to milliseconds
|
||||||
#if defined(__WINDOWS__)
|
#if defined(__WINDOWS__)
|
||||||
@@ -306,7 +304,10 @@ wxLongLong wxGetUTCTimeMillis()
|
|||||||
t /= 10000;
|
t /= 10000;
|
||||||
t -= wxLL(11644473600000); // Unix - Windows epochs difference in ms.
|
t -= wxLL(11644473600000); // Unix - Windows epochs difference in ms.
|
||||||
return t;
|
return t;
|
||||||
#elif defined(HAVE_GETTIMEOFDAY)
|
#else // !__WINDOWS__
|
||||||
|
wxLongLong val = MILLISECONDS_PER_SECOND;
|
||||||
|
|
||||||
|
#if defined(HAVE_GETTIMEOFDAY)
|
||||||
struct timeval tp;
|
struct timeval tp;
|
||||||
if ( wxGetTimeOfDay(&tp) != -1 )
|
if ( wxGetTimeOfDay(&tp) != -1 )
|
||||||
{
|
{
|
||||||
@@ -342,6 +343,8 @@ wxLongLong wxGetUTCTimeMillis()
|
|||||||
val *= wxGetUTCTime();
|
val *= wxGetUTCTime();
|
||||||
return val;
|
return val;
|
||||||
#endif // time functions
|
#endif // time functions
|
||||||
|
|
||||||
|
#endif // __WINDOWS__/!__WINDOWS__
|
||||||
}
|
}
|
||||||
|
|
||||||
wxLongLong wxGetLocalTimeMillis()
|
wxLongLong wxGetLocalTimeMillis()
|
||||||
|
Reference in New Issue
Block a user