class SIMPLE_PERIODIC_JOB

Features exported to ANY

Pseudo periodic job. The timing is not exact : the time between two execution may be longer than the given period depending on time needed to execute ready tasks. There is no try to recover the time lost each time.

Direct parents

conformant parents

PERIODIC_JOB

Summary

creation features

exported features

Details

set_work (t: FUNCTION [O_ -> TUPLE, R_][TUPLEBOOLEAN], tr: PROCEDURE [O_ -> TUPLE][TUPLE], prio: INTEGER, seconds: REAL)

t has to return True while continue

require

  • t /= Void
  • seconds > 0

ensure

  • period = seconds

set_work (t: FUNCTION [O_ -> TUPLE, R_][TUPLEBOOLEAN], tr: PROCEDURE [O_ -> TUPLE][TUPLE], prio: INTEGER, seconds: REAL)

t has to return True while continue

require

  • t /= Void
  • seconds > 0

ensure

  • period = seconds

period: REAL

unit is seconds

next_time: MICROSECOND_TIME

Class invariant