aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/mouse_event.cpp
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2015-04-03 20:27:27 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2015-04-03 20:27:27 +0200
commitfe9648fa1cdc8f9cf5216a88fadb8b96604047fd (patch)
tree011b7956b38a08b771d349866f9fabc0d5689fc9 /src/menu/mouse_event.cpp
parent0d9371a00c47991e9f62053b649d39e9504680d8 (diff)
downloadusdx-fe9648fa1cdc8f9cf5216a88fadb8b96604047fd.tar.gz
usdx-fe9648fa1cdc8f9cf5216a88fadb8b96604047fd.tar.xz
usdx-fe9648fa1cdc8f9cf5216a88fadb8b96604047fd.zip
base/time: Replaces by std::chrono.
Diffstat (limited to 'src/menu/mouse_event.cpp')
-rw-r--r--src/menu/mouse_event.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/menu/mouse_event.cpp b/src/menu/mouse_event.cpp
index 814e179c..3f4104a0 100644
--- a/src/menu/mouse_event.cpp
+++ b/src/menu/mouse_event.cpp
@@ -25,7 +25,6 @@
#include <cstddef>
#include "mouse_event.hpp"
-#include "base/time.hpp"
namespace usdx
{
@@ -49,16 +48,17 @@ namespace usdx
{
if (direction == UP) {
if (this->direction == DOWN) {
- if (time.since(5000))
+ if (time.since(std::chrono::milliseconds{5000}))
return CLICK;
}
else if (this->direction == CLICK) {
- if (time.since(5000))
+ if (time.since(std::chrono::milliseconds{5000}))
return DBL_CLICK;
}
}
else if (direction == DOWN) {
- if (this->direction == CLICK && time.since(5000))
+ if (this->direction == CLICK &&
+ time.since(std::chrono::milliseconds{5000}))
return CLICK;
}
}