Class Process

Class Documentation

class legion::core::scheduling::Process

Operation encapsulating object that keeps track of intervals and hooks into process-chains.

Public Functions

template<size_type charc>
inline Process(const char (&name)[charc], time::time_span<fast_time> interval = 0)
inline Process(const std::string &name, id_type nameHash, time::time_span<fast_time> interval = 0)
Process() = default
Process(Process&&) = default
Process &operator=(Process&&) = default
~Process() = default
inline id_type id() const

Returns the hash of the name of the process.

inline bool inUse() const
inline void setOperation(delegate<void(time::time_span<fast_time>)> &&operation)

Set the operation for the process to execute at the set interval.

inline void setInterval(time::time_span<fast_time> interval)

Set the interval at which to execute the set operation.

inline bool execute(float timeScale)

Update the process’ internal time measurements and execute the operation if necessary.

Return

bool True if the operation was executed and has completed the amount of executions in order to sate the interval, otherwise false.

Parameters
  • timeScale: Scalar to scale deltaTime with.