summaryrefslogtreecommitdiff
path: root/CSharp/Ivy
diff options
context:
space:
mode:
Diffstat (limited to 'CSharp/Ivy')
-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);
}
}
}