MCPcopy Create free account
hub / github.com/shidenggui/easyquant / __init__

Method __init__

easyquant/push_engine/clock_engine.py:22–33  ·  view source on GitHub ↗

:param interval: float(minute) :param trading: 在交易阶段才触发 :return:

(self, clock_engine, interval, trading=True, call=None)

Source from the content-addressed store, hash-verified

20
21class ClockIntervalHandler:
22 def __init__(self, clock_engine, interval, trading=True, call=None):
23 """
24 :param interval: float(minute)
25 :param trading: 在交易阶段才触发
26 :return:
27 """
28 self.clock_engine = clock_engine
29 self.clock_type = interval
30 self.interval = interval
31 self.second = int(interval * 60)
32 self.trading = trading
33 self.call = call or (lambda: None)
34
35 def is_active(self):
36 if self.trading:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected