Toolkits > com.ibm.streamsx.topology.pysamples 1.1.0 > com.ibm.streamsx.topology.pysamples.positional > PrintWithTimeIntervals
Print tuples with inter-tuple arrival delay.
@spl.for_each() class PrintWithTimeIntervals(object): "Print tuples with inter-tuple arrival delay." def __init__(self): self.last = datetime.now() def __call__(self, *tuple_): now = datetime.now() iat = now - self.last self.last = now print(tuple_, " ", iat, " seconds", flush=True)
__SPLPY__INPORT_0__DESCRIPTION__SPLPY__