# -*- coding: utf-8 -*-
import time


class Timer(object):

    def __init__(self):
        self.timers = []

    def set_timer(self, msg):
        args = msg.Body.split(' ')
        limit = int(args[1]) + time.time()
        if len(args) > 2:
            limit_message = args[2]
        else:
            limit_message = "It's time!"
        self.timers.append((limit, limit_message, msg))
        return 'OK'

    def has_arrived(self):
        now = time.time()
        for ls in self.timers:
            limit, limit_message, msg = ls
            if now > limit:
                self.timers.remove(ls)
                return msg, limit_message
        return False

fda9092959bb1943803ddcf9e9979ddb768b5c57
<mask token>


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

    def has_arrived(self):
        now = time.time()
        for ls in self.timers:
            limit, limit_message, msg = ls
            if now > limit:
                self.timers.remove(ls)
                return msg, limit_message
        return False

<mask token>


class Timer(object):

    def __init__(self):
        self.timers = []
    <mask token>

    def has_arrived(self):
        now = time.time()
        for ls in self.timers:
            limit, limit_message, msg = ls
            if now > limit:
                self.timers.remove(ls)
                return msg, limit_message
        return False

<mask token>


class Timer(object):

    def __init__(self):
        self.timers = []

    def set_timer(self, msg):
        args = msg.Body.split(' ')
        limit = int(args[1]) + time.time()
        if len(args) > 2:
            limit_message = args[2]
        else:
            limit_message = "It's time!"
        self.timers.append((limit, limit_message, msg))
        return 'OK'

    def has_arrived(self):
        now = time.time()
        for ls in self.timers:
            limit, limit_message, msg = ls
            if now > limit:
                self.timers.remove(ls)
                return msg, limit_message
        return False

import time


class Timer(object):

    def __init__(self):
        self.timers = []

    def set_timer(self, msg):
        args = msg.Body.split(' ')
        limit = int(args[1]) + time.time()
        if len(args) > 2:
            limit_message = args[2]
        else:
            limit_message = "It's time!"
        self.timers.append((limit, limit_message, msg))
        return 'OK'

    def has_arrived(self):
        now = time.time()
        for ls in self.timers:
            limit, limit_message, msg = ls
            if now > limit:
                self.timers.remove(ls)
                return msg, limit_message
        return False

# -*- coding: utf-8 -*-
import time


class Timer(object):

    def __init__(self):
        self.timers = []

    def set_timer(self, msg):
        args = msg.Body.split(' ')
        limit = int(args[1]) + time.time()
        if len(args) > 2:
            limit_message = args[2]
        else:
            limit_message = "It's time!"
        self.timers.append((limit, limit_message, msg))
        return 'OK'

    def has_arrived(self):
        now = time.time()
        for ls in self.timers:
            limit, limit_message, msg = ls
            if now > limit:
                self.timers.remove(ls)
                return msg, limit_message
        return False
