From 639b621a74dfa5da09b756f2cee5cde6e4b5cc07 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 10:04:37 +0000 Subject: Utilisateur : Fcolin Date : 20/01/06 Heure : 18:29 Archivé dans $/CSharp/Ivy/IvyPerf Commentaire: (vss 4) --- CSharp/Ivy/IvyPerf/IvyPerf.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CSharp/Ivy/IvyPerf/IvyPerf.cs b/CSharp/Ivy/IvyPerf/IvyPerf.cs index a25e58a..b51f3fd 100644 --- a/CSharp/Ivy/IvyPerf/IvyPerf.cs +++ b/CSharp/Ivy/IvyPerf/IvyPerf.cs @@ -24,14 +24,14 @@ namespace IvyPerf [IvyBinding("^ping ts=(.*)")] static void Reply(IvyClient client, string[] args) { - bus.sendMsg(c,"pong ts={0} tr={1}", args[0], currentTime()); + bus.sendMsg("pong ts={0} tr={1}", args[0], currentTime()); } [IvyBinding("^pong ts=(.*) tr=(.*)")] static void Pong(IvyClient client, string[] args) { double current = currentTime(); - double ts = double.Parse( args[0], c ); - double tr = double.Parse(args[1], c); + double ts = double.Parse( args[0], bus.Culture ); + double tr = double.Parse(args[1], bus.Culture ); double roundtrip1 = tr-ts; double roundtrip2 = current - ts; Console.WriteLine( "round trip {0} {1}", roundtrip1 , roundtrip2 ); @@ -42,7 +42,7 @@ namespace IvyPerf [STAThread] static void Main(string[] args) { - c = new CultureInfo("en-us"); + bus = new Ivy("IvyPerf", "IvyPref ready"); bus.AutoBinding(typeof(IvyPerf)); //bus.bindMsg( "^ping ts=(.*)", new Ivy.MessageHandler( Reply ) ); @@ -53,7 +53,7 @@ namespace IvyPerf while( true ) { Thread.Sleep( 1000 ); - int count = bus.sendMsg(c,"ping ts={0}", currentTime()); + int count = bus.sendMsg("ping ts={0}", currentTime()); if ( count == 0 ) Console.Write( "." ); } } -- cgit v1.1