summaryrefslogtreecommitdiff
path: root/CSharp
diff options
context:
space:
mode:
authorfcolin2007-02-01 10:04:48 +0000
committerfcolin2007-02-01 10:04:48 +0000
commit09d4c2183a0d29451f24fd60eb6a5164d1c608eb (patch)
tree65d03d4f911b48761ceac51b7e2973f8185f94bb /CSharp
parentea6f209aa905e5f9f64b469d0b22fb8a3b6e6f39 (diff)
downloadivy-csharp-09d4c2183a0d29451f24fd60eb6a5164d1c608eb.zip
ivy-csharp-09d4c2183a0d29451f24fd60eb6a5164d1c608eb.tar.gz
ivy-csharp-09d4c2183a0d29451f24fd60eb6a5164d1c608eb.tar.bz2
ivy-csharp-09d4c2183a0d29451f24fd60eb6a5164d1c608eb.tar.xz
Utilisateur : Fcolin Date : 2/06/06 Heure : 16:47 Archivé dans $/CSharp/Ivy/IvyPerf Commentaire: Mise ajour Lib Ivy (vss 9)
Diffstat (limited to 'CSharp')
-rw-r--r--CSharp/Ivy/IvyPerf/IvyPerf.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/CSharp/Ivy/IvyPerf/IvyPerf.cs b/CSharp/Ivy/IvyPerf/IvyPerf.cs
index db3302e..5cc69d8 100644
--- a/CSharp/Ivy/IvyPerf/IvyPerf.cs
+++ b/CSharp/Ivy/IvyPerf/IvyPerf.cs
@@ -17,14 +17,14 @@ namespace IvyPerf
static double currentTime() // en ms
{
double time;
- time = (double)DateTime.Now.Ticks / (double)TimeSpan.TicksPerMillisecond;
+ time = (double)(DateTime.Now.Ticks) / (double)(TimeSpan.TicksPerMillisecond);
//time = Environment.TickCount;
return time;
}
[IvyBinding("^ping ts=(.*)")]
static void Reply(IvyClient client, string[] args)
{
- bus.sendMsg("pong ts={0} tr={1}", args[0], currentTime() - origin );
+ bus.SendMsg("pong ts={0} tr={1}", args[0], currentTime() - origin );
}
[IvyBinding("^pong ts=(.*) tr=(.*)")]
static void Pong(IvyClient client, string[] args)
@@ -51,22 +51,22 @@ namespace IvyPerf
my_messsages.Add("pong");
my_messsages.Add("IvyPref");
bus = new Ivy("IvyPerf", "IvyPref ready");
- bus.BindingFilter += new Ivy.ClientRemoveBindingHandler(bus_BindingFilter);
+ bus.BindingFilter += new EventHandler<IvyEventArgs>(bus_BindingFilter);
bus.SentMessageClasses = my_messsages;
bus.AutoBinding(typeof(IvyPerf));
- bus.start(null);
+ bus.Start(null);
origin = currentTime();
while( true )
{
Thread.Sleep( timeout );
- int count = bus.sendMsg("ping ts={0}", currentTime() - origin );
+ int count = bus.SendMsg("ping ts={0}", currentTime() - origin );
if ( count == 0 ) Console.Write( "." );
}
}
- static void bus_BindingFilter(IvyClient app, string arg)
+ static void bus_BindingFilter(object sender, IvyEventArgs e)
{
- Console.WriteLine( "The app {0} regexp {1} was Filtred.", app.ApplicationName,arg);
+ Console.WriteLine( "The app {0} regexp {1} was Filtred.", e.Client.ApplicationName,e.Argument);
}
}
}