# Path: pysc2/lib/stopwatch.py
# class Stat(object):
# class StopWatchContext(object):
# class TracingStopWatchContext(StopWatchContext):
# class FakeStopWatchContext(object):
# class StopWatch(object):
#   def __init__(self):
#   def reset(self):
#   def add(self, val):
#   def avg(self):
#   def dev(self):
#   def merge(self, other):
#   def build(summation, average, standard_deviation, minimum, maximum, number):
#   def parse(s):
#   def __str__(self):
#   def __init__(self, stopwatch, name):
#   def __enter__(self):
#   def __exit__(self, unused_exception_type, unused_exc_value, unused_traceback):
#   def __enter__(self):
#   def __exit__(self, *args, **kwargs):
#   def _log(self, s):
#   def __enter__(self):
#   def __exit__(self, unused_exception_type, unused_exc_value, unused_traceback):
#   def __init__(self, enabled=True, trace=False):
#   def disable(self):
#   def enable(self):
#   def trace(self):
#   def custom(self, factory):
#   def __call__(self, name):
#   def decorate(self, name_or_func):
#     def decorator(name, func):
#       def _stopwatch(*args, **kwargs):
#   def push(self, name):
#   def pop(self):
#   def cur_stack(self):
#   def clear(self):
#   def add(self, name, duration):
#   def __getitem__(self, name):
#   def times(self):
#   def merge(self, other):
#   def parse(s):
#   def str(self, threshold=0.1):
#   def __str__(self):


import contextlib
import itertools
import os
import socket
import sys
import time
import enum
import websocket
from absl import logging
from absl import flags
from pysc2.lib import stopwatch
from s2clientprotocol import sc2api_pb2 as sc_pb
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Protocol library to make communication easy."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function





flags.DEFINE_integer("sc2_verbose_protocol", 0,
                     ("Print the communication packets with SC2. 0 disables. "
                      "-1 means all. >0 will print that many lines per "
                      "packet. 20 is a good starting value."))
FLAGS = flags.FLAGS



# Path: pysc2/lib/stopwatch.py
# class Stat(object):
# class StopWatchContext(object):
# class TracingStopWatchContext(StopWatchContext):
# class FakeStopWatchContext(object):
# class StopWatch(object):
#   def __init__(self):
#   def reset(self):
#   def add(self, val):
#   def avg(self):
#   def dev(self):
#   def merge(self, other):
#   def build(summation, average, standard_deviation, minimum, maximum, number):
#   def parse(s):
#   def __str__(self):
#   def __init__(self, stopwatch, name):
#   def __enter__(self):
#   def __exit__(self, unused_exception_type, unused_exc_value, unused_traceback):
#   def __enter__(self):
#   def __exit__(self, *args, **kwargs):
#   def _log(self, s):
#   def __enter__(self):
#   def __exit__(self, unused_exception_type, unused_exc_value, unused_traceback):
#   def __init__(self, enabled=True, trace=False):
#   def disable(self):
#   def enable(self):
#   def trace(self):
#   def custom(self, factory):
#   def __call__(self, name):
#   def decorate(self, name_or_func):
#     def decorator(name, func):
#       def _stopwatch(*args, **kwargs):
#   def push(self, name):
#   def pop(self):
#   def cur_stack(self):
#   def clear(self):
#   def add(self, name, duration):
#   def __getitem__(self, name):
#   def times(self):
#   def merge(self, other):
#   def parse(s):
#   def str(self, threshold=0.1):
#   def __str__(self):


# Path: pysc2/lib/protocol.py
import contextlib
import itertools
import os
import socket
import sys
import time
import enum
import websocket
from absl import logging
from absl import flags
from pysc2.lib import stopwatch
from s2clientprotocol import sc2api_pb2 as sc_pb

# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Protocol library to make communication easy."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function





flags.DEFINE_integer("sc2_verbose_protocol", 0,
                     ("Print the communication packets with SC2. 0 disables. "
                      "-1 means all. >0 will print that many lines per "
                      "packet. 20 is a good starting value."))
FLAGS = flags.FLAGS



sw = stopwatch.sw