add wxMilliClockToLong() helper

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-07-16 21:14:53 +00:00
parent 7bcc9eb973
commit 12d0b79493

View File

@ -90,8 +90,10 @@ extern long WXDLLIMPEXP_BASE wxGetUTCTime();
#if wxUSE_LONGLONG
typedef wxLongLong wxMilliClock_t;
inline long wxMilliClockToLong(wxLongLong ll) { return ll.ToLong(); }
#else
typedef double wxMilliClock_t;
inline long wxMilliClockToLong(double d) { return wx_truncate_cast(long, d); }
#endif // wxUSE_LONGLONG
// Get number of milliseconds since local time 00:00:00 Jan 1st 1970