Delphi Timer: Time before next event

前端 未结 2 1008
盖世英雄少女心
盖世英雄少女心 2020-12-11 15:59

Is it possible to determine when a TTimer in Delphi will trigger? I know how to calculate this based upon the timer\'s last run and the timers interval. Unfortunately, the

2条回答
  •  再見小時候
    2020-12-11 16:00

    There's absolutely no way to query a Windows timer for information of this nature. You will simply have to keep track of this yourself.

    I would do this by wrapping up the TTimer with composition and not inheritance. You can then be sure that you will capture all modifications to the timer state.

提交回复
热议问题