import time

class Timer(object):
    """A simple timer."""
    def __init__(self):
        self._total_time = 0
        self._calls = 0
        self._start_time = 0

    def tic(self):
        # using time.time instead of time.clock because time time.clock
        # does not normalize for multithreading
        self._start_time = time.time()

    def toc(self):
        _diff = time.time() - self._start_time
        self._total_time = self._total_time + _diff
        self._calls += + 1

    def average_time(self, name='default'):
        return self._total_time / self._calls

    def total_time(self, name='default'):
        return self._total_time

    def clean_total_time(self):
        self._total_time = 0
        self._calls = 0

timer = Timer()

3b3f9a750abbf8b309bca53d07ccfb32db863406
<mask token>


class Timer(object):
    <mask token>
    <mask token>

    def tic(self):
        self._start_time = time.time()

    def toc(self):
        _diff = time.time() - self._start_time
        self._total_time = self._total_time + _diff
        self._calls += +1

    def average_time(self, name='default'):
        return self._total_time / self._calls

    def total_time(self, name='default'):
        return self._total_time

    def clean_total_time(self):
        self._total_time = 0
        self._calls = 0


<mask token>

<mask token>


class Timer(object):
    <mask token>

    def __init__(self):
        self._total_time = 0
        self._calls = 0
        self._start_time = 0

    def tic(self):
        self._start_time = time.time()

    def toc(self):
        _diff = time.time() - self._start_time
        self._total_time = self._total_time + _diff
        self._calls += +1

    def average_time(self, name='default'):
        return self._total_time / self._calls

    def total_time(self, name='default'):
        return self._total_time

    def clean_total_time(self):
        self._total_time = 0
        self._calls = 0


<mask token>

<mask token>


class Timer(object):
    """A simple timer."""

    def __init__(self):
        self._total_time = 0
        self._calls = 0
        self._start_time = 0

    def tic(self):
        self._start_time = time.time()

    def toc(self):
        _diff = time.time() - self._start_time
        self._total_time = self._total_time + _diff
        self._calls += +1

    def average_time(self, name='default'):
        return self._total_time / self._calls

    def total_time(self, name='default'):
        return self._total_time

    def clean_total_time(self):
        self._total_time = 0
        self._calls = 0


<mask token>

import time


class Timer(object):
    """A simple timer."""

    def __init__(self):
        self._total_time = 0
        self._calls = 0
        self._start_time = 0

    def tic(self):
        self._start_time = time.time()

    def toc(self):
        _diff = time.time() - self._start_time
        self._total_time = self._total_time + _diff
        self._calls += +1

    def average_time(self, name='default'):
        return self._total_time / self._calls

    def total_time(self, name='default'):
        return self._total_time

    def clean_total_time(self):
        self._total_time = 0
        self._calls = 0


timer = Timer()

import time

class Timer(object):
    """A simple timer."""
    def __init__(self):
        self._total_time = 0
        self._calls = 0
        self._start_time = 0

    def tic(self):
        # using time.time instead of time.clock because time time.clock
        # does not normalize for multithreading
        self._start_time = time.time()

    def toc(self):
        _diff = time.time() - self._start_time
        self._total_time = self._total_time + _diff
        self._calls += + 1

    def average_time(self, name='default'):
        return self._total_time / self._calls

    def total_time(self, name='default'):
        return self._total_time

    def clean_total_time(self):
        self._total_time = 0
        self._calls = 0

timer = Timer()
