Did I find the right examples for you? yes no

All Samples(3)  |  Call(1)  |  Derive(0)  |  Import(2)

        def heartbeat_expires(date, freq, expire_window):
    timestamp = mktime(date.timetuple())
    return timestamp + freq * (expire_window / 1e2)
        


src/c/o/confine-controller-0.10.5/controller/apps/pings/models.py   confine-controller(Download)
 
from controller.utils.apps import is_installed
from controller.utils.time import heartbeat_expires
 
from .settings import PING_DEFAULT_INSTANCE, PING_INSTANCES, PING_COUNT
            'freq': settings.get('schedule'),
            'expire_window': settings.get('expire_window')}
        if time() > heartbeat_expires(last.date, **kwargs):
            return cls.NODATA
        if last.packet_loss == 100:

src/c/o/confine-controller-0.10.5/controller/apps/state/models.py   confine-controller(Download)
 
from controller.utils.functional import cached
from controller.utils.time import heartbeat_expires as heartbeatexpires
from nodes.models import Node
from slices.models import Sliver