- double seconds = difftime(this->CurrentClickTime, this->LastClickTime);
- if (seconds * 1000 <= this->DoubleClickTolerance)
+ double seconds;
+#if __cplusplus <= 199711L
+ seconds = difftime(this->CurrentClickTime, this->LastClickTime);
+#else
+ seconds = this->CurrentClickTime - this->LastClickTime;
+#endif
+
+ if (seconds <= this->DoubleClickTolerance)