public import "ecere" public class TimerTemp { bool active; Time count; Time from; void Start() { if(!active) { active = true; from = GetTime(); } } void Stop() { if(active) { active = false; count += GetTime() - from; } } void Reset() { count = 0; if(active) from = GetTime(); } } /* public class Delay : Seconds { private: Time from; public: property bool elapsed { get { Time now = GetTime(); if(!from || now - from > (Time)this) { from = now; return true; } return false; } } } */ public class TimeGate { private: Time from; public: Time delay; /* property bool { get { if(!from || GetTime() - from > delay) { from = GetTime(); return true; } return false; } } */ property bool elapsed { get { Time now = GetTime(); if(!from || now - from > delay) { from = now; return true; } return false; } } }