From: Vadim Zeitlin Date: Mon, 16 Jul 2007 21:14:53 +0000 (+0000) Subject: add wxMilliClockToLong() helper X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/12d0b7949306308b2de444f5581c23556047c4b8 add wxMilliClockToLong() helper git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/stopwatch.h b/include/wx/stopwatch.h index cc12e772a0..583c75a495 100644 --- a/include/wx/stopwatch.h +++ b/include/wx/stopwatch.h @@ -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