[smuxi] [Engine] Use milli-second precision in MessageModel.Equals()



commit 3f4e8d62875e680766b9ba9fcafb5fc23e9154b9
Author: Mirco Bauer <meebey meebey net>
Date:   Thu Feb 23 23:03:07 2012 +0100

    [Engine] Use milli-second precision in MessageModel.Equals()

 src/Engine/Messages/MessageModel.cs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/Engine/Messages/MessageModel.cs b/src/Engine/Messages/MessageModel.cs
index 679624c..24977fc 100644
--- a/src/Engine/Messages/MessageModel.cs
+++ b/src/Engine/Messages/MessageModel.cs
@@ -180,7 +180,8 @@ namespace Smuxi.Engine
                 return false;
             }
 
-            if (f_TimeStamp != msg.TimeStamp) {
+            // millisecond precision
+            if (Math.Abs(f_TimeStamp.Subtract(msg.TimeStamp).TotalMilliseconds) > 1) {
                 return false;
             }
             if (f_MessageType != msg.MessageType) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]