diff options
Diffstat (limited to 'SwifTools/Idle/MacOSXIdleQuerier.cpp')
-rw-r--r-- | SwifTools/Idle/MacOSXIdleQuerier.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/SwifTools/Idle/MacOSXIdleQuerier.cpp b/SwifTools/Idle/MacOSXIdleQuerier.cpp index 233d7c6..8eaece6 100644 --- a/SwifTools/Idle/MacOSXIdleQuerier.cpp +++ b/SwifTools/Idle/MacOSXIdleQuerier.cpp @@ -10,6 +10,7 @@ #include <cassert> #include <iostream> +#include <boost/numeric/conversion/cast.hpp> #include <CoreFoundation/CoreFoundation.h> namespace Swift { @@ -28,7 +29,7 @@ int MacOSXIdleQuerier::getIdleTimeSeconds() { assert(result); (void) result; CFRelease(property); - return idle / 1000000000; + return boost::numeric_cast<int>(idle / 1000000000); } } |