diff --git a/games/JS-chat/chat.rb b/games/JS-chat/chat.rb index 46d6a8a..aef27e5 100755 --- a/games/JS-chat/chat.rb +++ b/games/JS-chat/chat.rb @@ -11,7 +11,7 @@ class Chat include GGSDelegate include MyRandom - @@log_file_path = "/tmp/ggs-log.csv" + @@log_file_path = "/tmp/ggs-ping-log.csv" @@bot_threads = [] def initialize(is_bot=false, table_token="") @@ -26,8 +26,8 @@ class Chat table_token = gets.chomp unless @is_bot @ggs_network = GGSNetwork.new(self, table_token) - #@ggs_network.connect("192.168.0.2", 9000) - @ggs_network.connect("localhost", 9000) + @ggs_network.connect("192.168.0.2", 9000) + #@ggs_network.connect("localhost", 9000) end def ggsNetworkReady(ggs_network, am_i_host) @@ -146,7 +146,7 @@ class Chat end def pong(server_log) - time = (Time.now - @start_ping).to_s + time = ((Time.now - @start_ping) * 1000).to_s say "" File.open(@@log_file_path, 'a') {|f| f.write(time << ",#{server_log}\n") } unless @log.nil? diff --git a/src/ggs_stats.erl b/src/ggs_stats.erl index 0c43562..02d61d6 100644 --- a/src/ggs_stats.erl +++ b/src/ggs_stats.erl @@ -45,7 +45,7 @@ handle_cast({add_one, Type}, St) -> handle_cast(print, St) -> CS = length(ggs_coordinator:get_all_players()), S = lists:concat([CS,";",St#ate.server_messages,";",St#ate.client_messages]), - log("/tmp/ggs-log.csv", S), + log("/tmp/ggs-mps-log.csv", S), io:fwrite("CS:~w | CM:~w | SM:~w |~n", [CS, St#ate.server_messages, St#ate.client_messages]), {noreply, St};